@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.
- package/CHANGELOG.md +299 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -3
- 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 +59 -61
- 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/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/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/components/virtualization/GridVirtualScrollbar.js +8 -5
- 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 +1 -1
- package/constants/gridClasses.d.ts +13 -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/gridCheckboxSelectionColDef.js +1 -3
- 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 +60 -62
- 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/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/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
- 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 -2
- package/esm/constants/gridClasses.d.ts +13 -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/virtualization/useGridVirtualScroller.js +5 -9
- 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/index.d.ts +2 -1
- package/esm/internals/index.js +2 -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/index.d.ts +1 -0
- package/esm/material/index.js +164 -49
- 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 +56 -6
- package/esm/models/gridDataSource.d.ts +9 -4
- 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 -27
- 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/virtualization/useGridVirtualScroller.js +21 -25
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +15 -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/index.d.ts +1 -0
- package/material/index.js +170 -49
- 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 +56 -6
- package/models/gridDataSource.d.ts +9 -4
- 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 -27
- 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/gridCheckboxSelectionColDef.js +1 -3
- 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 +60 -62
- 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/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/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
- 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 -2
- package/modern/constants/gridClasses.d.ts +13 -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/virtualization/useGridVirtualScroller.js +5 -9
- 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/index.d.ts +2 -1
- package/modern/internals/index.js +2 -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/index.d.ts +1 -0
- package/modern/material/index.js +164 -49
- 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 +56 -6
- package/modern/models/gridDataSource.d.ts +9 -4
- 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 -27
- 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,294 @@
|
|
|
1
|
+
declare const keys: {
|
|
2
|
+
readonly spacingUnit: "--DataGrid-t-spacing-unit";
|
|
3
|
+
readonly colors: {
|
|
4
|
+
readonly border: {
|
|
5
|
+
readonly base: "--DataGrid-t-colors-border-base";
|
|
6
|
+
};
|
|
7
|
+
readonly foreground: {
|
|
8
|
+
readonly base: "--DataGrid-t-colors-foreground-base";
|
|
9
|
+
readonly muted: "--DataGrid-t-colors-foreground-muted";
|
|
10
|
+
readonly accent: "--DataGrid-t-colors-foreground-accent";
|
|
11
|
+
readonly disabled: "--DataGrid-t-colors-foreground-disabled";
|
|
12
|
+
};
|
|
13
|
+
readonly background: {
|
|
14
|
+
readonly base: "--DataGrid-t-colors-background-base";
|
|
15
|
+
readonly overlay: "--DataGrid-t-colors-background-overlay";
|
|
16
|
+
readonly backdrop: "--DataGrid-t-colors-background-backdrop";
|
|
17
|
+
};
|
|
18
|
+
readonly interactive: {
|
|
19
|
+
readonly hover: "--DataGrid-t-colors-interactive-hover";
|
|
20
|
+
readonly hoverOpacity: "--DataGrid-t-colors-interactive-hover-opacity";
|
|
21
|
+
readonly focus: "--DataGrid-t-colors-interactive-focus";
|
|
22
|
+
readonly focusOpacity: "--DataGrid-t-colors-interactive-focus-opacity";
|
|
23
|
+
readonly disabled: "--DataGrid-t-colors-interactive-disabled";
|
|
24
|
+
readonly disabledOpacity: "--DataGrid-t-colors-interactive-disabled-opacity";
|
|
25
|
+
readonly selected: "--DataGrid-t-colors-interactive-selected";
|
|
26
|
+
readonly selectedOpacity: "--DataGrid-t-colors-interactive-selected-opacity";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly header: {
|
|
30
|
+
readonly background: {
|
|
31
|
+
readonly base: "--DataGrid-t-header-background-base";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly cell: {
|
|
35
|
+
readonly background: {
|
|
36
|
+
readonly pinned: "--DataGrid-t-cell-background-pinned";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly radius: {
|
|
40
|
+
readonly base: "--DataGrid-t-radius-base";
|
|
41
|
+
};
|
|
42
|
+
readonly typography: {
|
|
43
|
+
readonly fontFamily: {
|
|
44
|
+
readonly base: "--DataGrid-t-typography-font-family-base";
|
|
45
|
+
};
|
|
46
|
+
readonly fontWeight: {
|
|
47
|
+
readonly light: "--DataGrid-t-typography-font-weight-light";
|
|
48
|
+
readonly regular: "--DataGrid-t-typography-font-weight-regular";
|
|
49
|
+
readonly medium: "--DataGrid-t-typography-font-weight-medium";
|
|
50
|
+
readonly bold: "--DataGrid-t-typography-font-weight-bold";
|
|
51
|
+
};
|
|
52
|
+
readonly body: {
|
|
53
|
+
readonly fontFamily: "--DataGrid-t-typography-body-font-family";
|
|
54
|
+
readonly fontSize: "--DataGrid-t-typography-body-font-size";
|
|
55
|
+
readonly fontWeight: "--DataGrid-t-typography-body-font-weight";
|
|
56
|
+
readonly letterSpacing: "--DataGrid-t-typography-body-letter-spacing";
|
|
57
|
+
readonly lineHeight: "--DataGrid-t-typography-body-line-height";
|
|
58
|
+
};
|
|
59
|
+
readonly small: {
|
|
60
|
+
readonly fontFamily: "--DataGrid-t-typography-small-font-family";
|
|
61
|
+
readonly fontSize: "--DataGrid-t-typography-small-font-size";
|
|
62
|
+
readonly fontWeight: "--DataGrid-t-typography-small-font-weight";
|
|
63
|
+
readonly letterSpacing: "--DataGrid-t-typography-small-letter-spacing";
|
|
64
|
+
readonly lineHeight: "--DataGrid-t-typography-small-line-height";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly transitions: {
|
|
68
|
+
readonly easing: {
|
|
69
|
+
readonly easeIn: "--DataGrid-t-transitions-easing-ease-in";
|
|
70
|
+
readonly easeOut: "--DataGrid-t-transitions-easing-ease-out";
|
|
71
|
+
readonly easeInOut: "--DataGrid-t-transitions-easing-ease-in-out";
|
|
72
|
+
};
|
|
73
|
+
readonly duration: {
|
|
74
|
+
readonly short: "--DataGrid-t-transitions-duration-short";
|
|
75
|
+
readonly base: "--DataGrid-t-transitions-duration-base";
|
|
76
|
+
readonly long: "--DataGrid-t-transitions-duration-long";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly shadows: {
|
|
80
|
+
readonly base: "--DataGrid-t-shadows-base";
|
|
81
|
+
readonly overlay: "--DataGrid-t-shadows-overlay";
|
|
82
|
+
};
|
|
83
|
+
readonly zIndex: {
|
|
84
|
+
readonly panel: "--DataGrid-t-z-index-panel";
|
|
85
|
+
readonly menu: "--DataGrid-t-z-index-menu";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type GridCSSVariablesInterface = { [E in CreateObjectEntries<typeof keys> as E['value']]: string | number };
|
|
89
|
+
type Entry = {
|
|
90
|
+
key: string;
|
|
91
|
+
value: unknown;
|
|
92
|
+
};
|
|
93
|
+
type EmptyEntry<TValue> = {
|
|
94
|
+
key: '';
|
|
95
|
+
value: TValue;
|
|
96
|
+
};
|
|
97
|
+
type CreateObjectEntries<TValue, TValueInitial = TValue> = TValue extends object ? { [TKey in keyof TValue]-?: TKey extends string ? OmitItself<TValue[TKey], TValueInitial> extends infer TNestedValue ? TNestedValue extends Entry ? {
|
|
98
|
+
key: `${TKey}.${TNestedValue['key']}`;
|
|
99
|
+
value: TNestedValue['value'];
|
|
100
|
+
} : never : never : never }[keyof TValue] : EmptyEntry<TValue>;
|
|
101
|
+
type OmitItself<TValue, TValueInitial> = TValue extends TValueInitial ? EmptyEntry<TValue> : CreateObjectEntries<TValue, TValueInitial>;
|
|
102
|
+
export declare const vars: {
|
|
103
|
+
spacingUnit: "--DataGrid-t-spacing-unit";
|
|
104
|
+
colors: {
|
|
105
|
+
readonly border: {
|
|
106
|
+
readonly base: "--DataGrid-t-colors-border-base";
|
|
107
|
+
};
|
|
108
|
+
readonly foreground: {
|
|
109
|
+
readonly base: "--DataGrid-t-colors-foreground-base";
|
|
110
|
+
readonly muted: "--DataGrid-t-colors-foreground-muted";
|
|
111
|
+
readonly accent: "--DataGrid-t-colors-foreground-accent";
|
|
112
|
+
readonly disabled: "--DataGrid-t-colors-foreground-disabled";
|
|
113
|
+
};
|
|
114
|
+
readonly background: {
|
|
115
|
+
readonly base: "--DataGrid-t-colors-background-base";
|
|
116
|
+
readonly overlay: "--DataGrid-t-colors-background-overlay";
|
|
117
|
+
readonly backdrop: "--DataGrid-t-colors-background-backdrop";
|
|
118
|
+
};
|
|
119
|
+
readonly interactive: {
|
|
120
|
+
readonly hover: "--DataGrid-t-colors-interactive-hover";
|
|
121
|
+
readonly hoverOpacity: "--DataGrid-t-colors-interactive-hover-opacity";
|
|
122
|
+
readonly focus: "--DataGrid-t-colors-interactive-focus";
|
|
123
|
+
readonly focusOpacity: "--DataGrid-t-colors-interactive-focus-opacity";
|
|
124
|
+
readonly disabled: "--DataGrid-t-colors-interactive-disabled";
|
|
125
|
+
readonly disabledOpacity: "--DataGrid-t-colors-interactive-disabled-opacity";
|
|
126
|
+
readonly selected: "--DataGrid-t-colors-interactive-selected";
|
|
127
|
+
readonly selectedOpacity: "--DataGrid-t-colors-interactive-selected-opacity";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
header: {
|
|
131
|
+
readonly background: {
|
|
132
|
+
readonly base: "--DataGrid-t-header-background-base";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
cell: {
|
|
136
|
+
readonly background: {
|
|
137
|
+
readonly pinned: "--DataGrid-t-cell-background-pinned";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
radius: {
|
|
141
|
+
readonly base: "--DataGrid-t-radius-base";
|
|
142
|
+
};
|
|
143
|
+
typography: {
|
|
144
|
+
readonly fontFamily: {
|
|
145
|
+
readonly base: "--DataGrid-t-typography-font-family-base";
|
|
146
|
+
};
|
|
147
|
+
readonly fontWeight: {
|
|
148
|
+
readonly light: "--DataGrid-t-typography-font-weight-light";
|
|
149
|
+
readonly regular: "--DataGrid-t-typography-font-weight-regular";
|
|
150
|
+
readonly medium: "--DataGrid-t-typography-font-weight-medium";
|
|
151
|
+
readonly bold: "--DataGrid-t-typography-font-weight-bold";
|
|
152
|
+
};
|
|
153
|
+
readonly body: {
|
|
154
|
+
readonly fontFamily: "--DataGrid-t-typography-body-font-family";
|
|
155
|
+
readonly fontSize: "--DataGrid-t-typography-body-font-size";
|
|
156
|
+
readonly fontWeight: "--DataGrid-t-typography-body-font-weight";
|
|
157
|
+
readonly letterSpacing: "--DataGrid-t-typography-body-letter-spacing";
|
|
158
|
+
readonly lineHeight: "--DataGrid-t-typography-body-line-height";
|
|
159
|
+
};
|
|
160
|
+
readonly small: {
|
|
161
|
+
readonly fontFamily: "--DataGrid-t-typography-small-font-family";
|
|
162
|
+
readonly fontSize: "--DataGrid-t-typography-small-font-size";
|
|
163
|
+
readonly fontWeight: "--DataGrid-t-typography-small-font-weight";
|
|
164
|
+
readonly letterSpacing: "--DataGrid-t-typography-small-letter-spacing";
|
|
165
|
+
readonly lineHeight: "--DataGrid-t-typography-small-line-height";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
transitions: {
|
|
169
|
+
readonly easing: {
|
|
170
|
+
readonly easeIn: "--DataGrid-t-transitions-easing-ease-in";
|
|
171
|
+
readonly easeOut: "--DataGrid-t-transitions-easing-ease-out";
|
|
172
|
+
readonly easeInOut: "--DataGrid-t-transitions-easing-ease-in-out";
|
|
173
|
+
};
|
|
174
|
+
readonly duration: {
|
|
175
|
+
readonly short: "--DataGrid-t-transitions-duration-short";
|
|
176
|
+
readonly base: "--DataGrid-t-transitions-duration-base";
|
|
177
|
+
readonly long: "--DataGrid-t-transitions-duration-long";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
shadows: {
|
|
181
|
+
readonly base: "--DataGrid-t-shadows-base";
|
|
182
|
+
readonly overlay: "--DataGrid-t-shadows-overlay";
|
|
183
|
+
};
|
|
184
|
+
zIndex: {
|
|
185
|
+
readonly panel: "--DataGrid-t-z-index-panel";
|
|
186
|
+
readonly menu: "--DataGrid-t-z-index-menu";
|
|
187
|
+
};
|
|
188
|
+
breakpoints: {
|
|
189
|
+
values: {
|
|
190
|
+
xs: number;
|
|
191
|
+
sm: number;
|
|
192
|
+
md: number;
|
|
193
|
+
lg: number;
|
|
194
|
+
xl: number;
|
|
195
|
+
};
|
|
196
|
+
up: (key: any) => string;
|
|
197
|
+
};
|
|
198
|
+
spacing: typeof spacing;
|
|
199
|
+
transition: typeof transition;
|
|
200
|
+
keys: {
|
|
201
|
+
readonly spacingUnit: "--DataGrid-t-spacing-unit";
|
|
202
|
+
readonly colors: {
|
|
203
|
+
readonly border: {
|
|
204
|
+
readonly base: "--DataGrid-t-colors-border-base";
|
|
205
|
+
};
|
|
206
|
+
readonly foreground: {
|
|
207
|
+
readonly base: "--DataGrid-t-colors-foreground-base";
|
|
208
|
+
readonly muted: "--DataGrid-t-colors-foreground-muted";
|
|
209
|
+
readonly accent: "--DataGrid-t-colors-foreground-accent";
|
|
210
|
+
readonly disabled: "--DataGrid-t-colors-foreground-disabled";
|
|
211
|
+
};
|
|
212
|
+
readonly background: {
|
|
213
|
+
readonly base: "--DataGrid-t-colors-background-base";
|
|
214
|
+
readonly overlay: "--DataGrid-t-colors-background-overlay";
|
|
215
|
+
readonly backdrop: "--DataGrid-t-colors-background-backdrop";
|
|
216
|
+
};
|
|
217
|
+
readonly interactive: {
|
|
218
|
+
readonly hover: "--DataGrid-t-colors-interactive-hover";
|
|
219
|
+
readonly hoverOpacity: "--DataGrid-t-colors-interactive-hover-opacity";
|
|
220
|
+
readonly focus: "--DataGrid-t-colors-interactive-focus";
|
|
221
|
+
readonly focusOpacity: "--DataGrid-t-colors-interactive-focus-opacity";
|
|
222
|
+
readonly disabled: "--DataGrid-t-colors-interactive-disabled";
|
|
223
|
+
readonly disabledOpacity: "--DataGrid-t-colors-interactive-disabled-opacity";
|
|
224
|
+
readonly selected: "--DataGrid-t-colors-interactive-selected";
|
|
225
|
+
readonly selectedOpacity: "--DataGrid-t-colors-interactive-selected-opacity";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
readonly header: {
|
|
229
|
+
readonly background: {
|
|
230
|
+
readonly base: "--DataGrid-t-header-background-base";
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly cell: {
|
|
234
|
+
readonly background: {
|
|
235
|
+
readonly pinned: "--DataGrid-t-cell-background-pinned";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
readonly radius: {
|
|
239
|
+
readonly base: "--DataGrid-t-radius-base";
|
|
240
|
+
};
|
|
241
|
+
readonly typography: {
|
|
242
|
+
readonly fontFamily: {
|
|
243
|
+
readonly base: "--DataGrid-t-typography-font-family-base";
|
|
244
|
+
};
|
|
245
|
+
readonly fontWeight: {
|
|
246
|
+
readonly light: "--DataGrid-t-typography-font-weight-light";
|
|
247
|
+
readonly regular: "--DataGrid-t-typography-font-weight-regular";
|
|
248
|
+
readonly medium: "--DataGrid-t-typography-font-weight-medium";
|
|
249
|
+
readonly bold: "--DataGrid-t-typography-font-weight-bold";
|
|
250
|
+
};
|
|
251
|
+
readonly body: {
|
|
252
|
+
readonly fontFamily: "--DataGrid-t-typography-body-font-family";
|
|
253
|
+
readonly fontSize: "--DataGrid-t-typography-body-font-size";
|
|
254
|
+
readonly fontWeight: "--DataGrid-t-typography-body-font-weight";
|
|
255
|
+
readonly letterSpacing: "--DataGrid-t-typography-body-letter-spacing";
|
|
256
|
+
readonly lineHeight: "--DataGrid-t-typography-body-line-height";
|
|
257
|
+
};
|
|
258
|
+
readonly small: {
|
|
259
|
+
readonly fontFamily: "--DataGrid-t-typography-small-font-family";
|
|
260
|
+
readonly fontSize: "--DataGrid-t-typography-small-font-size";
|
|
261
|
+
readonly fontWeight: "--DataGrid-t-typography-small-font-weight";
|
|
262
|
+
readonly letterSpacing: "--DataGrid-t-typography-small-letter-spacing";
|
|
263
|
+
readonly lineHeight: "--DataGrid-t-typography-small-line-height";
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly transitions: {
|
|
267
|
+
readonly easing: {
|
|
268
|
+
readonly easeIn: "--DataGrid-t-transitions-easing-ease-in";
|
|
269
|
+
readonly easeOut: "--DataGrid-t-transitions-easing-ease-out";
|
|
270
|
+
readonly easeInOut: "--DataGrid-t-transitions-easing-ease-in-out";
|
|
271
|
+
};
|
|
272
|
+
readonly duration: {
|
|
273
|
+
readonly short: "--DataGrid-t-transitions-duration-short";
|
|
274
|
+
readonly base: "--DataGrid-t-transitions-duration-base";
|
|
275
|
+
readonly long: "--DataGrid-t-transitions-duration-long";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly shadows: {
|
|
279
|
+
readonly base: "--DataGrid-t-shadows-base";
|
|
280
|
+
readonly overlay: "--DataGrid-t-shadows-overlay";
|
|
281
|
+
};
|
|
282
|
+
readonly zIndex: {
|
|
283
|
+
readonly panel: "--DataGrid-t-z-index-panel";
|
|
284
|
+
readonly menu: "--DataGrid-t-z-index-menu";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
declare function spacing(a?: number, b?: number, c?: number, d?: number): string;
|
|
289
|
+
declare function transition(props: string[], options?: {
|
|
290
|
+
duration?: string;
|
|
291
|
+
easing?: string;
|
|
292
|
+
delay?: number;
|
|
293
|
+
}): string;
|
|
294
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
// NOTE: Breakpoints can't come from the theme because we need access to them at
|
|
3
|
+
// initialization time and media-queries can't use CSS variables. For users with
|
|
4
|
+
// custom breakpoints, we might want to provide a way to configure them globally
|
|
5
|
+
// instead of through the theme.
|
|
6
|
+
const breakpoints = {
|
|
7
|
+
values: {
|
|
8
|
+
xs: 0,
|
|
9
|
+
// phone
|
|
10
|
+
sm: 600,
|
|
11
|
+
// tablet
|
|
12
|
+
md: 900,
|
|
13
|
+
// small laptop
|
|
14
|
+
lg: 1200,
|
|
15
|
+
// desktop
|
|
16
|
+
xl: 1536 // large screen
|
|
17
|
+
},
|
|
18
|
+
up: key => {
|
|
19
|
+
const values = breakpoints.values;
|
|
20
|
+
const value = typeof values[key] === 'number' ? values[key] : key;
|
|
21
|
+
return `@media (min-width:${value}px)`;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const keys = {
|
|
25
|
+
spacingUnit: '--DataGrid-t-spacing-unit',
|
|
26
|
+
/* Variables */
|
|
27
|
+
colors: {
|
|
28
|
+
border: {
|
|
29
|
+
base: '--DataGrid-t-colors-border-base'
|
|
30
|
+
},
|
|
31
|
+
foreground: {
|
|
32
|
+
base: '--DataGrid-t-colors-foreground-base',
|
|
33
|
+
muted: '--DataGrid-t-colors-foreground-muted',
|
|
34
|
+
accent: '--DataGrid-t-colors-foreground-accent',
|
|
35
|
+
disabled: '--DataGrid-t-colors-foreground-disabled'
|
|
36
|
+
},
|
|
37
|
+
background: {
|
|
38
|
+
base: '--DataGrid-t-colors-background-base',
|
|
39
|
+
overlay: '--DataGrid-t-colors-background-overlay',
|
|
40
|
+
backdrop: '--DataGrid-t-colors-background-backdrop'
|
|
41
|
+
},
|
|
42
|
+
interactive: {
|
|
43
|
+
hover: '--DataGrid-t-colors-interactive-hover',
|
|
44
|
+
hoverOpacity: '--DataGrid-t-colors-interactive-hover-opacity',
|
|
45
|
+
focus: '--DataGrid-t-colors-interactive-focus',
|
|
46
|
+
focusOpacity: '--DataGrid-t-colors-interactive-focus-opacity',
|
|
47
|
+
disabled: '--DataGrid-t-colors-interactive-disabled',
|
|
48
|
+
disabledOpacity: '--DataGrid-t-colors-interactive-disabled-opacity',
|
|
49
|
+
selected: '--DataGrid-t-colors-interactive-selected',
|
|
50
|
+
selectedOpacity: '--DataGrid-t-colors-interactive-selected-opacity'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
header: {
|
|
54
|
+
background: {
|
|
55
|
+
base: '--DataGrid-t-header-background-base'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
cell: {
|
|
59
|
+
background: {
|
|
60
|
+
pinned: '--DataGrid-t-cell-background-pinned'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
radius: {
|
|
64
|
+
base: '--DataGrid-t-radius-base'
|
|
65
|
+
},
|
|
66
|
+
typography: {
|
|
67
|
+
fontFamily: {
|
|
68
|
+
base: '--DataGrid-t-typography-font-family-base'
|
|
69
|
+
},
|
|
70
|
+
fontWeight: {
|
|
71
|
+
light: '--DataGrid-t-typography-font-weight-light',
|
|
72
|
+
regular: '--DataGrid-t-typography-font-weight-regular',
|
|
73
|
+
medium: '--DataGrid-t-typography-font-weight-medium',
|
|
74
|
+
bold: '--DataGrid-t-typography-font-weight-bold'
|
|
75
|
+
},
|
|
76
|
+
body: {
|
|
77
|
+
fontFamily: '--DataGrid-t-typography-body-font-family',
|
|
78
|
+
fontSize: '--DataGrid-t-typography-body-font-size',
|
|
79
|
+
fontWeight: '--DataGrid-t-typography-body-font-weight',
|
|
80
|
+
letterSpacing: '--DataGrid-t-typography-body-letter-spacing',
|
|
81
|
+
lineHeight: '--DataGrid-t-typography-body-line-height'
|
|
82
|
+
},
|
|
83
|
+
small: {
|
|
84
|
+
fontFamily: '--DataGrid-t-typography-small-font-family',
|
|
85
|
+
fontSize: '--DataGrid-t-typography-small-font-size',
|
|
86
|
+
fontWeight: '--DataGrid-t-typography-small-font-weight',
|
|
87
|
+
letterSpacing: '--DataGrid-t-typography-small-letter-spacing',
|
|
88
|
+
lineHeight: '--DataGrid-t-typography-small-line-height'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
transitions: {
|
|
92
|
+
easing: {
|
|
93
|
+
easeIn: '--DataGrid-t-transitions-easing-ease-in',
|
|
94
|
+
easeOut: '--DataGrid-t-transitions-easing-ease-out',
|
|
95
|
+
easeInOut: '--DataGrid-t-transitions-easing-ease-in-out'
|
|
96
|
+
},
|
|
97
|
+
duration: {
|
|
98
|
+
short: '--DataGrid-t-transitions-duration-short',
|
|
99
|
+
base: '--DataGrid-t-transitions-duration-base',
|
|
100
|
+
long: '--DataGrid-t-transitions-duration-long'
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
shadows: {
|
|
104
|
+
base: '--DataGrid-t-shadows-base',
|
|
105
|
+
overlay: '--DataGrid-t-shadows-overlay'
|
|
106
|
+
},
|
|
107
|
+
zIndex: {
|
|
108
|
+
panel: '--DataGrid-t-z-index-panel',
|
|
109
|
+
menu: '--DataGrid-t-z-index-menu'
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const values = wrap(keys);
|
|
113
|
+
export const vars = _extends({
|
|
114
|
+
breakpoints,
|
|
115
|
+
spacing,
|
|
116
|
+
transition,
|
|
117
|
+
keys
|
|
118
|
+
}, values);
|
|
119
|
+
function spacing(a, b, c, d) {
|
|
120
|
+
/* eslint-disable prefer-template */
|
|
121
|
+
if (a === undefined) {
|
|
122
|
+
return spacingString(1);
|
|
123
|
+
}
|
|
124
|
+
if (b === undefined) {
|
|
125
|
+
return spacingString(a);
|
|
126
|
+
}
|
|
127
|
+
if (c === undefined) {
|
|
128
|
+
return spacingString(a) + ' ' + spacingString(b);
|
|
129
|
+
}
|
|
130
|
+
if (d === undefined) {
|
|
131
|
+
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c);
|
|
132
|
+
}
|
|
133
|
+
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c) + ' ' + spacingString(d);
|
|
134
|
+
/* eslint-enable prefer-template */
|
|
135
|
+
}
|
|
136
|
+
function spacingString(value) {
|
|
137
|
+
if (value === 0) {
|
|
138
|
+
return '0';
|
|
139
|
+
}
|
|
140
|
+
return `calc(var(--DataGrid-t-spacing-unit) * ${value})`;
|
|
141
|
+
}
|
|
142
|
+
function transition(props, options) {
|
|
143
|
+
const {
|
|
144
|
+
duration = vars.transitions.duration.base,
|
|
145
|
+
easing = vars.transitions.easing.easeInOut,
|
|
146
|
+
delay = 0
|
|
147
|
+
} = options ?? {};
|
|
148
|
+
return props.map(prop => `${prop} ${duration} ${easing} ${delay}ms`).join(', ');
|
|
149
|
+
}
|
|
150
|
+
function wrap(input) {
|
|
151
|
+
if (typeof input === 'string') {
|
|
152
|
+
return `var(${input})`;
|
|
153
|
+
}
|
|
154
|
+
const result = {};
|
|
155
|
+
for (const key in input) {
|
|
156
|
+
if (Object.hasOwn(input, key)) {
|
|
157
|
+
result[key] = wrap(input[key]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon, GridNoColumnsOverlay } from "../components/index.js";
|
|
2
|
+
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon, GridNoColumnsOverlay, GridToolbar } from "../components/index.js";
|
|
3
3
|
import { GridCell } from "../components/cell/GridCell.js";
|
|
4
4
|
import { GridColumnHeaders } from "../components/GridColumnHeaders.js";
|
|
5
5
|
import { GridColumnMenu } from "../components/menu/columnMenu/GridColumnMenu.js";
|
|
@@ -22,7 +22,7 @@ export const DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, materialSlots, {
|
|
|
22
22
|
bottomContainer: GridBottomContainer,
|
|
23
23
|
footer: GridFooter,
|
|
24
24
|
footerRowCount: GridRowCount,
|
|
25
|
-
toolbar:
|
|
25
|
+
toolbar: GridToolbar,
|
|
26
26
|
pinnedRows: GridPinnedRows,
|
|
27
27
|
loadingOverlay: GridLoadingOverlay,
|
|
28
28
|
noResultsOverlay: GridNoResultsOverlay,
|
|
@@ -260,6 +260,14 @@ export interface GridClasses {
|
|
|
260
260
|
* Styles applied to the columns management footer element.
|
|
261
261
|
*/
|
|
262
262
|
columnsManagementFooter: string;
|
|
263
|
+
/**
|
|
264
|
+
* Styles applied to the columns management scroll area element.
|
|
265
|
+
*/
|
|
266
|
+
columnsManagementScrollArea: string;
|
|
267
|
+
/**
|
|
268
|
+
* Styles applied to the columns management empty text element.
|
|
269
|
+
*/
|
|
270
|
+
columnsManagementEmptyText: string;
|
|
263
271
|
/**
|
|
264
272
|
* Styles applied to the top container.
|
|
265
273
|
*/
|
|
@@ -586,6 +594,11 @@ export interface GridClasses {
|
|
|
586
594
|
* Styles applied to the sort icon element.
|
|
587
595
|
*/
|
|
588
596
|
sortIcon: string;
|
|
597
|
+
/**
|
|
598
|
+
* Styles applied to the shadow scroll area element.
|
|
599
|
+
* @ignore - do not document.
|
|
600
|
+
*/
|
|
601
|
+
shadowScrollArea: string;
|
|
589
602
|
/**
|
|
590
603
|
* Styles applied to the toolbar container element.
|
|
591
604
|
*/
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'toolbarPromptControl', 'toolbarPromptControl--recording', 'toolbarPromptControlRecordingIndicator', 'toolbarPromptControlRecordButton', 'toolbarPromptControlSendButton', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'shadowScrollArea', 'toolbarContainer', 'toolbarFilterList', 'toolbarPromptControl', 'toolbarPromptControl--recording', 'toolbarPromptControlRecordingIndicator', 'toolbarPromptControlRecordButton', 'toolbarPromptControlSendButton', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom']);
|
|
@@ -3,6 +3,7 @@ import { GridApiContext } from "../components/GridApiContext.js";
|
|
|
3
3
|
import { GridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
4
4
|
import { GridRootPropsContext } from "./GridRootPropsContext.js";
|
|
5
5
|
import { GridConfigurationContext } from "../components/GridConfigurationContext.js";
|
|
6
|
+
import { GridCSSVariablesContext } from "../utils/css/context.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export function GridContextProvider({
|
|
8
9
|
privateApiRef,
|
|
@@ -19,7 +20,9 @@ export function GridContextProvider({
|
|
|
19
20
|
value: privateApiRef,
|
|
20
21
|
children: /*#__PURE__*/_jsx(GridApiContext.Provider, {
|
|
21
22
|
value: apiRef,
|
|
22
|
-
children:
|
|
23
|
+
children: /*#__PURE__*/_jsx(GridCSSVariablesContext, {
|
|
24
|
+
children: children
|
|
25
|
+
})
|
|
23
26
|
})
|
|
24
27
|
})
|
|
25
28
|
})
|
|
@@ -3,6 +3,7 @@ import { useGridApiOptionHandler, useGridNativeEventListener } from "../../utils
|
|
|
3
3
|
import { gridFocusCellSelector } from "../focus/gridFocusStateSelector.js";
|
|
4
4
|
import { serializeCellValue } from "../export/serializers/csvSerializer.js";
|
|
5
5
|
import { isCopyShortcut } from "../../../utils/keyboardUtils.js";
|
|
6
|
+
import { gridRowSelectionCountSelector } from "../rowSelection/index.js";
|
|
6
7
|
function writeToClipboardPolyfill(data) {
|
|
7
8
|
const span = document.createElement('span');
|
|
8
9
|
span.style.whiteSpace = 'pre';
|
|
@@ -63,8 +64,8 @@ export const useGridClipboard = (apiRef, props) => {
|
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
66
|
let textToCopy = '';
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
67
|
+
const selectedRowsCount = gridRowSelectionCountSelector(apiRef);
|
|
68
|
+
if (selectedRowsCount > 0) {
|
|
68
69
|
textToCopy = apiRef.current.getDataAsCsv({
|
|
69
70
|
includeHeaders: false,
|
|
70
71
|
delimiter: clipboardCopyCellDelimiter,
|
|
@@ -135,7 +135,7 @@ export const useGridColumnHeaders = props => {
|
|
|
135
135
|
const indexInSection = i;
|
|
136
136
|
const sectionLength = renderedColumns.length;
|
|
137
137
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
138
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.
|
|
138
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
|
|
139
139
|
columns.push(/*#__PURE__*/_jsx(GridColumnHeaderItem, _extends({}, sortColumnLookup[colDef.field], {
|
|
140
140
|
columnMenuOpen: open,
|
|
141
141
|
filterItemsCounter: filterColumnLookup[colDef.field] && filterColumnLookup[colDef.field].length,
|
|
@@ -255,7 +255,7 @@ export const useGridColumnHeaders = props => {
|
|
|
255
255
|
pinnedPosition: pinnedPosition,
|
|
256
256
|
pinnedOffset: pinnedOffset,
|
|
257
257
|
showLeftBorder: shouldCellShowLeftBorder(pinnedPosition, indexInSection),
|
|
258
|
-
showRightBorder: shouldCellShowRightBorder(pinnedPosition, indexInSection, visibleColumnGroupHeader.length, rootProps.
|
|
258
|
+
showRightBorder: shouldCellShowRightBorder(pinnedPosition, indexInSection, visibleColumnGroupHeader.length, rootProps.showColumnVerticalBorder, gridHasFiller)
|
|
259
259
|
}, index);
|
|
260
260
|
});
|
|
261
261
|
return getFillers(params, children, leftOverflow);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
|
+
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
5
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
5
6
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
6
7
|
import { findGridCellElementsFromCol, findGridElement, findLeftPinnedCellsAfterCol, findRightPinnedCellsBeforeCol, getFieldFromHeaderElem, findHeaderElementFromField, getFieldsFromGroupHeaderElem, findGroupHeaderElementsFromField, findGridHeader, findGridCells, findParentElementFromClassName, findLeftPinnedHeadersAfterCol, findRightPinnedHeadersBeforeCol, escapeOperandAttributeSelector } from "../../../utils/domUtils.js";
|
|
@@ -14,6 +14,7 @@ export interface GridColumnsState {
|
|
|
14
14
|
orderedFields: string[];
|
|
15
15
|
lookup: GridColumnLookup;
|
|
16
16
|
columnVisibilityModel: GridColumnVisibilityModel;
|
|
17
|
+
initialColumnVisibilityModel: GridColumnVisibilityModel;
|
|
17
18
|
}
|
|
18
19
|
export interface GridPinnedColumnFields {
|
|
19
20
|
left?: string[];
|
|
@@ -26,6 +26,13 @@ export declare const gridColumnDefinitionsSelector: import("../../..").OutputSel
|
|
|
26
26
|
* @category Visible Columns
|
|
27
27
|
*/
|
|
28
28
|
export declare const gridColumnVisibilityModelSelector: import("../../..").OutputSelector<GridStateCommunity, import("./gridColumnsInterfaces").GridColumnsState, import("./gridColumnsInterfaces").GridColumnVisibilityModel>;
|
|
29
|
+
/**
|
|
30
|
+
* Get the "initial" column visibility model, containing the visibility status of each column.
|
|
31
|
+
* It is updated when the `columns` prop is updated or when `updateColumns` API method is called.
|
|
32
|
+
* If a column is not registered in the model, it is visible.
|
|
33
|
+
* @category Visible Columns
|
|
34
|
+
*/
|
|
35
|
+
export declare const gridInitialColumnVisibilityModelSelector: import("../../..").OutputSelector<GridStateCommunity, import("./gridColumnsInterfaces").GridColumnsState, import("./gridColumnsInterfaces").GridColumnVisibilityModel>;
|
|
29
36
|
/**
|
|
30
37
|
* Get the visible columns as a lookup (an object containing the field for keys and the definition for values).
|
|
31
38
|
* @category Visible Columns
|
|
@@ -33,6 +33,14 @@ export const gridColumnDefinitionsSelector = createSelectorMemoized(gridColumnFi
|
|
|
33
33
|
*/
|
|
34
34
|
export const gridColumnVisibilityModelSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.columnVisibilityModel);
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Get the "initial" column visibility model, containing the visibility status of each column.
|
|
38
|
+
* It is updated when the `columns` prop is updated or when `updateColumns` API method is called.
|
|
39
|
+
* If a column is not registered in the model, it is visible.
|
|
40
|
+
* @category Visible Columns
|
|
41
|
+
*/
|
|
42
|
+
export const gridInitialColumnVisibilityModelSelector = createSelector(gridColumnsStateSelector, columnsState => columnsState.initialColumnVisibilityModel);
|
|
43
|
+
|
|
36
44
|
/**
|
|
37
45
|
* Get the visible columns as a lookup (an object containing the field for keys and the definition for values).
|
|
38
46
|
* @category Visible Columns
|
|
@@ -48,12 +48,14 @@ export declare const createColumnsState: ({
|
|
|
48
48
|
columnsToUpsert,
|
|
49
49
|
initialState,
|
|
50
50
|
columnVisibilityModel,
|
|
51
|
-
keepOnlyColumnsToUpsert
|
|
51
|
+
keepOnlyColumnsToUpsert,
|
|
52
|
+
updateInitialVisibilityModel
|
|
52
53
|
}: {
|
|
53
54
|
columnsToUpsert: readonly GridColDef[];
|
|
54
55
|
initialState: GridColumnsInitialState | undefined;
|
|
55
56
|
columnVisibilityModel?: GridColumnVisibilityModel;
|
|
56
57
|
keepOnlyColumnsToUpsert: boolean;
|
|
58
|
+
updateInitialVisibilityModel?: boolean;
|
|
57
59
|
apiRef: RefObject<GridApiCommunity>;
|
|
58
60
|
}) => GridColumnsState;
|
|
59
61
|
export declare function getFirstNonSpannedColumnToRender({
|