diff --git a/docs/pages/api-docs/accordion-summary.json b/docs/pages/api-docs/accordion-summary.json index 9b4343b2576923..d761ee6e6cf944 100644 --- a/docs/pages/api-docs/accordion-summary.json +++ b/docs/pages/api-docs/accordion-summary.json @@ -8,7 +8,16 @@ }, "name": "AccordionSummary", "styles": { - "classes": ["root", "expanded", "focusVisible", "disabled", "content", "expandIconWrapper"], + "classes": [ + "root", + "expanded", + "focusVisible", + "disabled", + "gutters", + "contentGutters", + "content", + "expandIconWrapper" + ], "globalClasses": { "expanded": "Mui-expanded", "focusVisible": "Mui-focusVisible", diff --git a/docs/pages/api-docs/accordion.json b/docs/pages/api-docs/accordion.json index e33a1d5a993252..0418744b77d4d1 100644 --- a/docs/pages/api-docs/accordion.json +++ b/docs/pages/api-docs/accordion.json @@ -4,6 +4,7 @@ "classes": { "type": { "name": "object" } }, "defaultExpanded": { "type": { "name": "bool" } }, "disabled": { "type": { "name": "bool" } }, + "disableGutters": { "type": { "name": "bool" } }, "expanded": { "type": { "name": "bool" } }, "onChange": { "type": { "name": "func" } }, "square": { "type": { "name": "bool" } }, @@ -13,7 +14,7 @@ }, "name": "Accordion", "styles": { - "classes": ["root", "rounded", "expanded", "disabled", "region"], + "classes": ["root", "rounded", "expanded", "disabled", "gutters", "region"], "globalClasses": { "expanded": "Mui-expanded", "disabled": "Mui-disabled" }, "name": "MuiAccordion" }, diff --git a/docs/pages/api-docs/table-pagination.json b/docs/pages/api-docs/table-pagination.json index 7428a683fc7905..6ff8723807331a 100644 --- a/docs/pages/api-docs/table-pagination.json +++ b/docs/pages/api-docs/table-pagination.json @@ -36,13 +36,12 @@ "root", "toolbar", "spacer", - "selectLabel", + "caption", "selectRoot", "select", "selectIcon", "input", "menuItem", - "displayedRows", "actions" ], "globalClasses": {}, diff --git a/docs/src/pages/components/accordion/CustomizedAccordions.js b/docs/src/pages/components/accordion/CustomizedAccordions.js index 7ac86687c66e9f..b2c870722cf3ee 100644 --- a/docs/src/pages/components/accordion/CustomizedAccordions.js +++ b/docs/src/pages/components/accordion/CustomizedAccordions.js @@ -9,15 +9,9 @@ const Accordion = withStyles({ root: { border: '1px solid rgba(0, 0, 0, .125)', boxShadow: 'none', - '&:not(:last-child)': { - borderBottom: 0, - }, '&:before': { display: 'none', }, - '&$expanded': { - margin: 'auto', - }, }, expanded: {}, })(MuiAccordion); @@ -57,6 +51,7 @@ export default function CustomizedAccordions() {
disabled={true}
"
},
+ "gutters": {
+ "description": "Styles applied to {{nodeName}} unless {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "disableGutters={true}
"
+ },
+ "contentGutters": {
+ "description": "Styles applied to {{nodeName}} unless {{conditions}}.",
+ "nodeName": "the children wrapper element",
+ "conditions": "disableGutters={true}
"
+ },
"content": {
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the children wrapper element"
diff --git a/docs/translations/api-docs/accordion/accordion.json b/docs/translations/api-docs/accordion/accordion.json
index 9b386dc8b647c6..29f0459670ab28 100644
--- a/docs/translations/api-docs/accordion/accordion.json
+++ b/docs/translations/api-docs/accordion/accordion.json
@@ -5,6 +5,7 @@
"classes": "Override or extend the styles applied to the component. See CSS API below for more details.",
"defaultExpanded": "If true
, expands the accordion by default.",
"disabled": "If true
, the component is disabled.",
+ "disableGutters": "If true
, the bottom margin of an expanded accordion is removed and the AccordionSummary
height did not change.",
"expanded": "If true
, expands the accordion, otherwise collapse it. Setting this prop enables control over the accordion.",
"onChange": "Callback fired when the expand/collapse state is changed.function(event: object, expanded: boolean) => void
expanded
state of the accordion.",
"square": "If true
, rounded corners are disabled.",
@@ -29,6 +30,11 @@
"nodeName": "the root element",
"conditions": "disabled={true}
"
},
+ "gutters": {
+ "description": "Styles applied to {{nodeName}} unless {{conditions}}.",
+ "nodeName": "the root element",
+ "conditions": "disableGutters={true}
"
+ },
"region": {
"description": "Styles applied to {{nodeName}}, {{conditions}}.",
"nodeName": "the region element",
diff --git a/docs/translations/api-docs/table-pagination/table-pagination.json b/docs/translations/api-docs/table-pagination/table-pagination.json
index 8e89ce9e1a643a..7b73e7cf5b45b8 100644
--- a/docs/translations/api-docs/table-pagination/table-pagination.json
+++ b/docs/translations/api-docs/table-pagination/table-pagination.json
@@ -29,9 +29,10 @@
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the spacer element"
},
- "selectLabel": {
- "description": "Styles applied to {{nodeName}}.",
- "nodeName": "the select label Typography element"
+ "caption": {
+ "description": "Styles applied to {{nodeName}} if {{conditions}}.",
+ "nodeName": "the caption Typography component",
+ "conditions": "variant=\"caption\"
"
},
"selectRoot": {
"description": "Styles applied to {{nodeName}}.",
@@ -53,10 +54,6 @@
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the MenuItem component"
},
- "displayedRows": {
- "description": "Styles applied to {{nodeName}}.",
- "nodeName": "the displayed rows Typography element"
- },
"actions": {
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the internal `TablePaginationActions` component"
diff --git a/packages/material-ui-lab/src/DesktopDatePicker/DesktopDatePicker.test.tsx b/packages/material-ui-lab/src/DesktopDatePicker/DesktopDatePicker.test.tsx
index c331e6f9a01126..f65e0c37edc084 100644
--- a/packages/material-ui-lab/src/DesktopDatePicker/DesktopDatePicker.test.tsx
+++ b/packages/material-ui-lab/src/DesktopDatePicker/DesktopDatePicker.test.tsx
@@ -2,72 +2,24 @@ import * as React from 'react';
import { expect } from 'chai';
import { spy } from 'sinon';
import TextField from '@material-ui/core/TextField';
-import { act, fireEvent, screen } from 'test/utils';
+import { fireEvent, screen, waitFor } from 'test/utils';
import DesktopDatePicker from '@material-ui/lab/DesktopDatePicker';
import {
createPickerRender,
FakeTransitionComponent,
adapterToUse,
getByMuiTest,
+ openDesktopPicker,
} from '../internal/pickers/test-utils';
-const UncontrolledOpenDesktopDatePicker = (({
- onClose = () => {},
- onOpen = () => {},
- open: openProp,
- defaultOpen,
- ...other
-}: any) => {
- if (openProp != null) {
- throw new TypeError('Controlling `open` is not supported. Use `defaultOpen` instead.');
- }
- const [open, setOpen] = React.useState(defaultOpen);
-
- return (
- { toolbar?: string; /** Styles applied to the spacer element. */ spacer?: string; - /** Styles applied to the select label Typography element. */ - selectLabel?: string; + /** Styles applied to the caption Typography component if `variant="caption"`. */ + caption?: string; /** Styles applied to the Select component root element. */ selectRoot?: string; /** Styles applied to the Select component `select` class. */ @@ -48,8 +48,6 @@ export interface TablePaginationTypeMap
{
input?: string;
/** Styles applied to the MenuItem component. */
menuItem?: string;
- /** Styles applied to the displayed rows Typography element. */
- displayedRows?: string;
/** Styles applied to the internal `TablePaginationActions` component. */
actions?: string;
};
diff --git a/packages/material-ui/src/TablePagination/TablePagination.js b/packages/material-ui/src/TablePagination/TablePagination.js
index 82f2b3e179d363..05d71b92f9f321 100644
--- a/packages/material-ui/src/TablePagination/TablePagination.js
+++ b/packages/material-ui/src/TablePagination/TablePagination.js
@@ -32,8 +32,8 @@ export const styles = (theme) => ({
spacer: {
flex: '1 1 100%',
},
- /* Styles applied to the select label Typography element. */
- selectLabel: {
+ /* Styles applied to the caption Typography component if `variant="caption"`. */
+ caption: {
flexShrink: 0,
},
// TODO v5: `.selectRoot` should be merged with `.input`
@@ -60,10 +60,6 @@ export const styles = (theme) => ({
},
/* Styles applied to the MenuItem component. */
menuItem: {},
- /* Styles applied to the displayed rows Typography element. */
- displayedRows: {
- flexShrink: 0,
- },
/* Styles applied to the internal `TablePaginationActions` component. */
actions: {
flexShrink: 0,
@@ -125,7 +121,7 @@ const TablePagination = React.forwardRef(function TablePagination(props, ref) {