Skip to content

Commit

Permalink
Bump MUI Internal (#14937)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lukas <llukas.tyla@gmail.com>
  • Loading branch information
renovate[bot] and LukasTy authored Oct 17, 2024
1 parent 54cde58 commit c73e9a8
Show file tree
Hide file tree
Showing 21 changed files with 334 additions and 73 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@emotion/react": "^11.13.3",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.13.0",
"@mui/docs": "6.1.2",
"@mui/docs": "6.1.4",
"@mui/icons-material": "^5.16.7",
"@mui/joy": "^5.0.0-beta.48",
"@mui/lab": "^5.0.0-alpha.173",
Expand Down Expand Up @@ -102,7 +102,7 @@
"@babel/plugin-transform-react-constant-elements": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@mui/internal-docs-utils": "^1.0.14",
"@mui/internal-scripts": "^1.0.22",
"@mui/internal-scripts": "^1.0.24",
"@types/chance": "^1.1.6",
"@types/d3-scale": "^4.0.8",
"@types/d3-scale-chromatic": "^3.0.3",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.7",
"@mui/internal-babel-plugin-resolve-imports": "1.0.18",
"@mui/internal-markdown": "^1.0.15",
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-markdown": "^1.0.17",
"@mui/internal-test-utils": "^1.0.17",
"@mui/material": "^5.16.7",
"@mui/monorepo": "github:mui/material-ui#010de4505361345951824d905d1508d6f258ba67",
"@mui/utils": "^5.16.6",
Expand Down
40 changes: 40 additions & 0 deletions packages/x-charts-pro/src/BarChartPro/BarChartPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,46 @@ function BarChartPlotZoom(props: BarPlotProps) {
return <BarPlot {...props} skipAnimation={isInteracting || undefined} />;
}

BarChartPlotZoom.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
/**
* If provided, the function will be used to format the label of the bar.
* It can be set to 'value' to display the current value.
* @param {BarItem} item The item to format.
* @param {BarLabelContext} context data about the bar.
* @returns {string} The formatted label.
*/
barLabel: PropTypes.oneOfType([PropTypes.oneOf(['value']), PropTypes.func]),
/**
* Defines the border radius of the bar element.
*/
borderRadius: PropTypes.number,
/**
* Callback fired when a bar item is clicked.
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
* @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
*/
onItemClick: PropTypes.func,
/**
* If `true`, animations are skipped.
* @default undefined
*/
skipAnimation: PropTypes.bool,
/**
* The props used for each component slot.
* @default {}
*/
slotProps: PropTypes.object,
/**
* Overridable component slots.
* @default {}
*/
slots: PropTypes.object,
} as any;

export interface BarChartProProps extends BarChartProps, ZoomProps {}

/**
Expand Down
90 changes: 90 additions & 0 deletions packages/x-charts-pro/src/LineChartPro/LineChartPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,106 @@ function AreaPlotZoom(props: AreaPlotProps) {
return <AreaPlot {...props} skipAnimation={isInteracting || undefined} />;
}

AreaPlotZoom.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
/**
* Callback fired when a line area item is clicked.
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
*/
onItemClick: PropTypes.func,
/**
* If `true`, animations are skipped.
* @default false
*/
skipAnimation: PropTypes.bool,
/**
* The props used for each component slot.
* @default {}
*/
slotProps: PropTypes.object,
/**
* Overridable component slots.
* @default {}
*/
slots: PropTypes.object,
} as any;

function LinePlotZoom(props: LinePlotProps) {
const { isInteracting } = useZoom();
return <LinePlot {...props} skipAnimation={isInteracting || undefined} />;
}

LinePlotZoom.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
/**
* Callback fired when a line item is clicked.
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
* @param {LineItemIdentifier} lineItemIdentifier The line item identifier.
*/
onItemClick: PropTypes.func,
/**
* If `true`, animations are skipped.
* @default false
*/
skipAnimation: PropTypes.bool,
/**
* The props used for each component slot.
* @default {}
*/
slotProps: PropTypes.object,
/**
* Overridable component slots.
* @default {}
*/
slots: PropTypes.object,
} as any;

function MarkPlotZoom(props: MarkPlotProps) {
const { isInteracting } = useZoom();
return <MarkPlot {...props} skipAnimation={isInteracting || undefined} />;
}

MarkPlotZoom.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
/**
* If `true` the mark element will only be able to render circle.
* Giving fewer customization options, but saving around 40ms per 1.000 marks.
* @default false
*/
experimentalRendering: PropTypes.bool,
/**
* Callback fired when a line mark item is clicked.
* @param {React.MouseEvent<SVGPathElement, MouseEvent>} event The event source of the callback.
* @param {LineItemIdentifier} lineItemIdentifier The line mark item identifier.
*/
onItemClick: PropTypes.func,
/**
* If `true`, animations are skipped.
* @default false
*/
skipAnimation: PropTypes.bool,
/**
* The props used for each component slot.
* @default {}
*/
slotProps: PropTypes.object,
/**
* Overridable component slots.
* @default {}
*/
slots: PropTypes.object,
} as any;

export interface LineChartProProps extends LineChartProps, ZoomProps {}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/x-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-test-utils": "^1.0.17",
"@mui/material": "^5.16.7",
"@mui/system": "^5.16.7",
"@react-spring/core": "^9.7.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid-premium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-test-utils": "^1.0.17",
"@mui/material": "^5.16.7",
"@mui/system": "^5.16.7",
"@types/prop-types": "^15.7.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-test-utils": "^1.0.17",
"@mui/material": "^5.16.7",
"@mui/system": "^5.16.7",
"@types/prop-types": "^15.7.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-test-utils": "^1.0.17",
"@mui/joy": "^5.0.0-beta.48",
"@mui/material": "^5.16.7",
"@mui/system": "^5.16.7",
Expand Down
8 changes: 8 additions & 0 deletions packages/x-data-grid/src/components/GridRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ function EmptyCell({ width }: { width: number }) {
);
}

EmptyCell.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
width: PropTypes.number.isRequired,
} as any;

const GridRow = React.forwardRef<HTMLDivElement, GridRowProps>(function GridRow(props, refProp) {
const {
selected,
Expand Down
9 changes: 9 additions & 0 deletions packages/x-data-grid/src/components/base/GridOverlays.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ function GridOverlayWrapper(props: React.PropsWithChildren<GridOverlaysProps>) {
);
}

GridOverlayWrapper.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
loadingOverlayVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
overlayType: PropTypes.oneOf(['loadingOverlay', 'noResultsOverlay', 'noRowsOverlay']),
} as any;

GridOverlays.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@ const GridGenericColumnMenu = React.forwardRef<HTMLUListElement, GridGenericColu
},
);

GridGenericColumnMenu.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
colDef: PropTypes.object.isRequired,
/**
* Initial `slotProps` - it is internal, to be overrriden by Pro or Premium packages
* @ignore - do not document.
*/
defaultSlotProps: PropTypes.object.isRequired,
/**
* Initial `slots` - it is internal, to be overrriden by Pro or Premium packages
* @ignore - do not document.
*/
defaultSlots: PropTypes.object.isRequired,
hideMenu: PropTypes.func.isRequired,
id: PropTypes.string,
labelledby: PropTypes.string,
open: PropTypes.bool.isRequired,
/**
* Could be used to pass new props or override props specific to a column menu component
* e.g. `displayOrder`
*/
slotProps: PropTypes.object,
/**
* `slots` could be used to add new and (or) override default column menu items
* If you register a nee component you must pass it's `displayOrder` in `slotProps`
* or it will be placed in the end of the list
*/
slots: PropTypes.object,
} as any;

const GridColumnMenu = React.forwardRef<HTMLUListElement, GridColumnMenuProps>(
function GridColumnMenu(props, ref) {
return (
Expand Down
63 changes: 60 additions & 3 deletions packages/x-data-grid/src/components/toolbar/GridToolbarExport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface GridToolbarExportProps {
[key: string]: any;
}

export function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps) {
function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps) {
const apiRef = useGridApiContext();
const { hideMenu, options, ...other } = props;

Expand All @@ -52,7 +52,28 @@ export function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps) {
);
}

export function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps) {
GridCsvExportMenuItem.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
hideMenu: PropTypes.func,
options: PropTypes.shape({
allColumns: PropTypes.bool,
delimiter: PropTypes.string,
disableToolbarButton: PropTypes.bool,
escapeFormulas: PropTypes.bool,
fields: PropTypes.arrayOf(PropTypes.string),
fileName: PropTypes.string,
getRowsToExport: PropTypes.func,
includeColumnGroupsHeaders: PropTypes.bool,
includeHeaders: PropTypes.bool,
shouldAppendQuotes: PropTypes.bool,
utf8WithBom: PropTypes.bool,
}),
} as any;

function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps) {
const apiRef = useGridApiContext();
const { hideMenu, options, ...other } = props;

Expand All @@ -69,6 +90,42 @@ export function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps) {
);
}

GridPrintExportMenuItem.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "pnpm proptypes" |
// ----------------------------------------------------------------------
hideMenu: PropTypes.func,
options: PropTypes.shape({
allColumns: PropTypes.bool,
bodyClassName: PropTypes.string,
copyStyles: PropTypes.bool,
disableToolbarButton: PropTypes.bool,
fields: PropTypes.arrayOf(PropTypes.string),
fileName: PropTypes.string,
getRowsToExport: PropTypes.func,
hideFooter: PropTypes.bool,
hideToolbar: PropTypes.bool,
includeCheckboxes: PropTypes.bool,
pageStyle: PropTypes.oneOfType([
PropTypes.shape({
'__@hasInstance@646': PropTypes.func.isRequired,
'__@metadata@648': PropTypes.any,
apply: PropTypes.func.isRequired,
arguments: PropTypes.any.isRequired,
bind: PropTypes.func.isRequired,
call: PropTypes.func.isRequired,
caller: PropTypes.object.isRequired,
length: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
prototype: PropTypes.any.isRequired,
toString: PropTypes.func.isRequired,
}),
PropTypes.string,
]),
}),
} as any;

const GridToolbarExport = React.forwardRef<HTMLButtonElement, GridToolbarExportProps>(
function GridToolbarExport(props, ref) {
const { csvOptions = {}, printOptions = {}, excelOptions, ...other } = props;
Expand Down Expand Up @@ -107,4 +164,4 @@ GridToolbarExport.propTypes = {
slotProps: PropTypes.object,
} as any;

export { GridToolbarExport };
export { GridToolbarExport, GridCsvExportMenuItem, GridPrintExportMenuItem };
2 changes: 1 addition & 1 deletion packages/x-date-pickers-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^1.0.15",
"@mui/internal-test-utils": "^1.0.17",
"@mui/material": "^5.16.7",
"@mui/system": "^5.16.7",
"@types/luxon": "^3.4.2",
Expand Down
Loading

0 comments on commit c73e9a8

Please sign in to comment.