Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into test-new-vale-config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Feb 21, 2024
2 parents 3560407 + 4ad004d commit 58085db
Show file tree
Hide file tree
Showing 136 changed files with 1,791 additions and 559 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos

- The clipboard related exports `ignoreValueFormatterDuringExport` and `splitClipboardPastedText` are no longer prefixed with `unstable_`.

- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs) prop to customize filter debounce time.
- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.

- The `slots.preferencesPanel` slot and the `slotProps.preferencesPanel` prop were removed. Use `slots.panel` and `slotProps.panel` instead.

Expand Down
8 changes: 1 addition & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const productionPlugins = [
];

module.exports = function getBabelConfig(api) {
const useESModules = api.env(['legacy', 'modern', 'stable', 'rollup']);
const useESModules = api.env(['modern', 'stable', 'rollup']);

const presets = [
[
Expand Down Expand Up @@ -155,12 +155,6 @@ module.exports = function getBabelConfig(api) {
],
],
},
legacy: {
plugins: [
// IE11 support
'@babel/plugin-transform-object-assign',
],
},
test: {
sourceMaps: 'both',
plugins: [
Expand Down
16 changes: 0 additions & 16 deletions docs/.link-check-errors.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
Broken links found by `yarn docs:link-check` that exist:

- https://mui.com/base-ui/react-autocomplete/hooks-api/#use-autocomplete
- https://mui.com/base-ui/react-portal/components-api/
- https://mui.com/material-ui/api/button/#props
- https://mui.com/material-ui/api/input-base/#InputBase-prop-disableInjectingGlobalStyles
- https://mui.com/material-ui/api/menu-item/#css
- https://mui.com/material-ui/api/popper/#props
- https://mui.com/material-ui/guides/api/#native-properties
- https://mui.com/system/styles/api/#creategenerateclassname-options-class-name-generator
- https://mui.com/system/styles/api/#serverstylesheets
- https://mui.com/system/styles/api/#stylesprovider
- https://mui.com/system/styles/api/#themeprovider
- https://mui.com/x/api/charts/gauge/#classes
- https://mui.com/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs
- https://mui.com/x/api/data-grid/data-grid/#props
- https://mui.com/x/api/data-grid/data-grid/#slots
- https://mui.com/x/api/date-pickers/date-picker/#slots
2 changes: 0 additions & 2 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ module.exports = function getBabelConfig(api) {
],
plugins: [
...baseConfig.plugins,
// for IE 11 support
'@babel/plugin-transform-object-assign',
'babel-plugin-preval',
[
'babel-plugin-module-resolver',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/charts/components/components.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Charts - Custom components
productId: x-charts
components: ChartsClipPath, ChartsSurface, CartesianContextProvider, DrawingProvider, HighlightProvider, InteractionProvider, SeriesContextProvider
components: ChartsClipPath, ChartsSurface
---

# Charts - Custom components
Expand Down
2 changes: 1 addition & 1 deletion docs/data/charts/heat-map/heat-map.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: React Heat map chart
title: React Heatmap chart
productId: x-charts
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ const GridCellExpand = React.memo(function GridCellExpand(props) {
}

function handleKeyDown(nativeEvent) {
// IE11, Edge (prior to using Bink?) use 'Esc'
if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {
if (nativeEvent.key === 'Escape') {
setShowFullCell(false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ const GridCellExpand = React.memo(function GridCellExpand(
}

function handleKeyDown(nativeEvent: KeyboardEvent) {
// IE11, Edge (prior to using Bink?) use 'Esc'
if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {
if (nativeEvent.key === 'Escape') {
setShowFullCell(false);
}
}
Expand Down
4 changes: 3 additions & 1 deletion docs/data/date-pickers/date-picker/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ materialDesign: https://m2.material.io/components/date-pickers
## Component composition

The component is built using the `DateField` for the keyboard editing and the `DateCalendar` for the view editing.
All the documented props of those two components can also be passed to the Date Picker component.

Check-out their documentation page for more information:

- [Date Field](/x/react-date-pickers/date-field/)
- [Date Calendar](/x/react-date-pickers/date-calendar/)

You can check the available props of the combined component on the dedicated [API page](/x/api/date-pickers/date-picker/#props).
Some [DateField props](/x/api/date-pickers/date-field/#props) are not available on the Picker component, you can use `slotProps.field` to pass them to the field.

## Uncontrolled vs. controlled value

The value of the component can be uncontrolled or controlled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ materialDesign: https://m2.material.io/components/date-pickers
## Component composition

The component is built using the `MultiInputDateRangeField` for the keyboard editing and the `DateRangeCalendar` for the view editing.
All the documented props of those two components can also be passed to the Date Range Picker component.

Check-out their documentation page for more information:

- [Date Range Field](/x/react-date-pickers/date-range-field/)
- [Date Range Calendar](/x/react-date-pickers/date-range-calendar/)

You can check the available props of the combined component on the dedicated [API page](/x/api/date-pickers/date-range-picker/#props).
Some [MultiInputDateRangeField props](/x/api/date-pickers/multi-input-date-range-field/#props) are not available on the Picker component, you can use `slotProps.field` to pass them to the field.

## Uncontrolled vs. controlled value

The value of the component can be uncontrolled or controlled.
Expand Down
4 changes: 3 additions & 1 deletion docs/data/date-pickers/date-time-picker/date-time-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ materialDesign: https://m2.material.io/components/date-pickers
## Component composition

The component is built using the `DateTimeField` for the keyboard editing, the `DateCalendar` for the date view editing, the `DigitalClock` for the desktop view editing, and the `TimeClock` for the mobile time view editing.
All the documented props of those four components can also be passed to the Date Time Picker component.

Check-out their documentation page for more information:

Expand All @@ -27,6 +26,9 @@ Check-out their documentation page for more information:
- [Digital Clock](/x/react-date-pickers/digital-clock/)
- [Time Clock](/x/react-date-pickers/time-clock/)

You can check the available props of the combined component on the dedicated [API page](/x/api/date-pickers/date-time-picker/#props).
Some [DateTimeField props](/x/api/date-pickers/date-time-field/#props) are not available on the Picker component, you can use `slotProps.field` to pass them to the field.

## Uncontrolled vs. controlled value

The value of the component can be uncontrolled or controlled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ materialDesign: https://m2.material.io/components/date-pickers
## Component composition

The component is built using the `MultiInputDateTimeRangeField` for the keyboard editing, the `DateRangeCalendar` for the date view editing and `DigitalClock` for the time view editing.
All the documented props of those two components can also be passed to the Date Time Range Picker component.

Check-out their documentation page for more information:

- [Date Time Range Field](/x/react-date-pickers/date-time-range-field/)
- [Date Range Calendar](/x/react-date-pickers/date-range-calendar/)
- [Digital Clock](/x/react-date-pickers/digital-clock/)

You can check the available props of the combined component on the dedicated [API page](/x/api/date-pickers/date-time-range-picker/#props).
Some [MultiInputDateTimeRangeField props](/x/api/date-pickers/multi-input-date-time-range-field/#props) are not available on the Picker component, you can use `slotProps.field` to pass them to the field.

## Uncontrolled vs. controlled value

The value of the component can be uncontrolled or controlled.
Expand Down
4 changes: 3 additions & 1 deletion docs/data/date-pickers/time-picker/time-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ materialDesign: https://m2.material.io/components/time-pickers
## Component composition

The component is built using the `TimeField` for the keyboard editing, the `DigitalClock` for the desktop view editing, and the `TimeClock` for the mobile view editing.
All the documented props of those two components can also be passed to the Time Picker component.

Check-out their documentation page for more information:

- [Time Field](/x/react-date-pickers/time-field/)
- [Digital Clock](/x/react-date-pickers/digital-clock/)
- [Time Clock](/x/react-date-pickers/time-clock/)

You can check the available props of the combined component on the dedicated [API page](/x/api/date-pickers/time-picker/#props).
Some [TimeField props](/x/api/date-pickers/time-field/#props) are not available on the Picker component, you can use `slotProps.field` to pass them to the field.

## Uncontrolled vs. controlled value

The value of the component can be uncontrolled or controlled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ See the [Direct state access](/x/react-data-grid/state/#direct-selector-access)
```
- The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` are no longer exported.
Use the [`filterDebounceMs`](/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs) prop to customize filter debounce time.
Use the [`filterDebounceMs`](/x/api/data-grid/data-grid/#data-grid-prop-filterDebounceMs) prop to customize filter debounce time.
- The `GridPreferencesPanel` component is not exported anymore as it wasn't meant to be used outside of the Data Grid.
Expand Down
8 changes: 8 additions & 0 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const chartsPkg = loadPkg('./packages/x-charts');
const treeViewPkg = loadPkg('./packages/x-tree-view');

export default withDocsInfra({
experimental: {
workerThreads: true,
cpus: 3,
},
// Avoid conflicts with the other Next.js apps hosted under https://mui.com/
assetPrefix: process.env.DEPLOY_ENV === 'development' ? undefined : '/x',
env: {
Expand Down Expand Up @@ -72,6 +76,10 @@ export default withDocsInfra({
...config.resolve,
alias: {
...config.resolve.alias,
'@mui/docs': path.resolve(
currentDirectory,
'../node_modules/@mui/monorepo/packages/mui-docs/src',
),
docs: path.resolve(currentDirectory, '../node_modules/@mui/monorepo/docs'),
docsx: path.resolve(currentDirectory, '../docs'),
},
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"dependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-object-assign": "^7.23.3",
"@babel/runtime-corejs2": "^7.23.9",
"@docsearch/react": "^3.5.2",
"@emotion/cache": "^11.11.0",
Expand Down
7 changes: 4 additions & 3 deletions docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import GoogleAnalytics from 'docs/src/modules/components/GoogleAnalytics';
import { ThemeProvider } from 'docs/src/modules/components/ThemeContext';
import { CodeVariantProvider } from 'docs/src/modules/utils/codeVariant';
import { CodeCopyProvider } from 'docs/src/modules/utils/CodeCopy';
import { UserLanguageProvider } from 'docs/src/modules/utils/i18n';
import DocsStyledEngineProvider from 'docs/src/modules/utils/StyledEngineProvider';
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers';
import createEmotionCache from 'docs/src/createEmotionCache';
import findActivePage from 'docs/src/modules/utils/findActivePage';
import { LicenseInfo } from '@mui/x-license';
import getProductInfoFromUrl from 'docs/src/modules/utils/getProductInfoFromUrl';
import { DocsProvider } from '@mui/docs/DocsProvider';
import config from '../config';

// Remove the license warning from demonstration purposes
LicenseInfo.setLicenseKey(process.env.NEXT_PUBLIC_MUI_LICENSE);
Expand Down Expand Up @@ -305,7 +306,7 @@ function AppWrapper(props) {
<meta name="mui:productId" content={productId} />
<meta name="mui:productCategoryId" content={productCategoryId} />
</NextHead>
<UserLanguageProvider defaultUserLanguage={pageProps.userLanguage}>
<DocsProvider config={config} defaultUserLanguage={pageProps.userLanguage}>
<CodeCopyProvider>
<CodeVariantProvider>
<PageContext.Provider value={pageContextValue}>
Expand All @@ -318,7 +319,7 @@ function AppWrapper(props) {
</PageContext.Provider>
</CodeVariantProvider>
</CodeCopyProvider>
</UserLanguageProvider>
</DocsProvider>
</React.Fragment>
);
}
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/x/api/data-grid/data-grid-premium.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import ApiPage from 'docs/src/modules/components/ApiPage';
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
import layoutConfig from 'docsx/src/modules/utils/dataGridLayoutConfig';
import jsonPageContent from './data-grid-premium.json';

export default function Page(props) {
const { descriptions, pageContent } = props;
return <ApiPage descriptions={descriptions} pageContent={pageContent} />;
return <ApiPage {...layoutConfig} descriptions={descriptions} pageContent={pageContent} />;
}

Page.getInitialProps = () => {
Expand Down
Loading

0 comments on commit 58085db

Please sign in to comment.