Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Batch small changes #22565

Merged
merged 11 commits into from
Sep 13, 2020
1 change: 0 additions & 1 deletion dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ async function cleanup() {
/**
* creates a callback for Object.entries(comparison).filter that excludes every
* entry that does not exceed the given threshold values for parsed and gzip size
*
* @param {number} parsedThreshold
* @param {number} gzipThreshold
*/
Expand Down
1 change: 0 additions & 1 deletion docs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function LanguageNegotiation() {

/**
* Priority: on first render: navigated value, persisted value; otherwise initial value, 'JS'
*
* @returns {string} - The persisted variant if the initial value is undefined
*/
function usePersistCodeVariant() {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The `MuiChip` name can be used for providing [default props](/customization/glob
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the chip should be displayed in a disabled state. |
| <span class="prop-name">icon</span> | <span class="prop-type">element</span> | | Icon element. |
| <span class="prop-name">label</span> | <span class="prop-type">node</span> | | The content of the label. |
| <span class="prop-name">onDelete</span> | <span class="prop-type">func</span> | | Callback function fired when the delete icon is clicked. If set, the delete icon will be shown. |
| <span class="prop-name">onDelete</span> | <span class="prop-type">func</span> | | Callback fired when the delete icon is clicked. If set, the delete icon will be shown. |
| <span class="prop-name">size</span> | <span class="prop-type">'medium'<br>&#124;&nbsp;'small'</span> | <span class="prop-default">'medium'</span> | The size of the chip. |
| <span class="prop-name">variant</span> | <span class="prop-type">'default'<br>&#124;&nbsp;'outlined'</span> | <span class="prop-default">'default'</span> | The variant to use. |

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/native-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The `MuiNativeSelect` name can be used for providing [default props](/customizat
| <span class="prop-name">IconComponent</span> | <span class="prop-type">elementType</span> | <span class="prop-default">ArrowDropDownIcon</span> | The icon that displays the arrow. |
| <span class="prop-name">input</span> | <span class="prop-type">element</span> | <span class="prop-default">&lt;Input /></span> | An `Input` element; does not have to be a material-ui specific `Input`. |
| <span class="prop-name">inputProps</span> | <span class="prop-type">object</span> | | Attributes applied to the `select` element. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback function fired when a menu item is selected.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when a menu item is selected.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
| <span class="prop-name">value</span> | <span class="prop-type">any</span> | | The input value. The DOM API casts this to a string. |
| <span class="prop-name">variant</span> | <span class="prop-type">'filled'<br>&#124;&nbsp;'outlined'<br>&#124;&nbsp;'standard'</span> | | The variant to use. |

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The `MuiSelect` name can be used for providing [default props](/customization/gl
| <span class="prop-name">MenuProps</span> | <span class="prop-type">object</span> | | Props applied to the [`Menu`](/api/menu/) element. |
| <span class="prop-name">multiple</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, `value` must be an array and the menu will support multiple selections. |
| <span class="prop-name">native</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the component will be using a native `select` element. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback function fired when a menu item is selected.<br><br>**Signature:**<br>`function(event: object, child?: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (any).<br>*child:* The react element that was selected when `native` is `false` (default). |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when a menu item is selected.<br><br>**Signature:**<br>`function(event: object, child?: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (any).<br>*child:* The react element that was selected when `native` is `false` (default). |
| <span class="prop-name">onClose</span> | <span class="prop-type">func</span> | | Callback fired when the component requests to be closed. Use in controlled mode (see open).<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. |
| <span class="prop-name">onOpen</span> | <span class="prop-type">func</span> | | Callback fired when the component requests to be opened. Use in controlled mode (see open).<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. |
| <span class="prop-name">open</span> | <span class="prop-type">bool</span> | | Control `select` open state. You can only use it when the `native` prop is `false` (default). |
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/swipeable-drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
| <span class="prop-name required">onOpen<abbr title="required">*</abbr></span> | <span class="prop-type">func</span> | | Callback fired when the component requests to be opened.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. |
| <span class="prop-name required">open<abbr title="required">*</abbr></span> | <span class="prop-type">bool</span> | | If `true`, the drawer is open. |
| <span class="prop-name">SwipeAreaProps</span> | <span class="prop-type">object</span> | | The element is used to intercept the touch events on the edge. |
| <span class="prop-name">swipeAreaWidth</span> | <span class="prop-type">number</span> | <span class="prop-default">20</span> | The width of the left most (or right most) area in pixels where the drawer can be swiped open from. |
| <span class="prop-name">swipeAreaWidth</span> | <span class="prop-type">number</span> | <span class="prop-default">20</span> | The width of the left most (or right most) area in px that the drawer can be swiped open from. |
| <span class="prop-name">transitionDuration</span> | <span class="prop-type">number<br>&#124;&nbsp;{ appear?: number, enter?: number, exit?: number }</span> | <span class="prop-default">{ enter: duration.enteringScreen, exit: duration.leavingScreen }</span> | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. |

The `ref` is forwarded to the root element.
Expand Down
1 change: 0 additions & 1 deletion docs/scripts/buildApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const inheritedComponentRegexp = /\/\/ @inheritedComponent (.*)/;
/**
* Receives a component's test information and source code and return's an object
* containing the inherited component's name and pathname
*
* @param testInfo Information retrieved from the component's describeConformance() in its test.js file
* @param src The component's source code
*/
Expand Down
1 change: 0 additions & 1 deletion docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ const useDemoToolbarStyles = makeStyles(
const alwaysTrue = () => true;

/**
*
* @param {React.Ref<HTMLElement>[]} controlRefs
* @param {object} [options]
* @param {(index: number) => boolean} [options.isFocusableControl] In case certain controls become unfocusable
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/DiamondSponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function DiamondSponsors(props) {
width="125"
height="35"
src={`/static/in-house/doit-intl.png`}
alt="octopus"
alt="doit-intl"
title="Management Platform for Google Cloud and AWS"
loading="lazy"
/>
Expand Down
1 change: 0 additions & 1 deletion docs/src/modules/utils/generateMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ The \`${reactAPI.styles.name}\` name can be used for providing [default props](/
/**
* Returns `null` if the prop should be ignored.
* Throws if it is invalid.
*
* @param prop
* @param propName
*/
Expand Down
1 change: 0 additions & 1 deletion docs/src/modules/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const packagesWithBundledTypes = ['date-fns'];
* in packagesWithBundledTypes
*
* @see packagesWithBundledTypes in this module namespace
*
* @param {Record<string, string>} deps - list of dependency as `name => version`
*/
function addTypeDeps(deps) {
Expand Down
2 changes: 0 additions & 2 deletions docs/src/modules/utils/parseMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export function getDescription(markdown) {

/**
* Render markdown used in the Material-UI docs
*
* @param {string} markdown
* @param {object} [options]
* @param {function} [options.highlight] - https://marked.js.org/#/USING_ADVANCED.md#highlight
Expand Down Expand Up @@ -118,7 +117,6 @@ const externs = [
];

/**
*
* @param {object} config
* @param {() => string} config.requireRaw - returnvalue of require.context
* @param {string} config.pageFilename - filename relative to nextjs pages directory
Expand Down
3 changes: 0 additions & 3 deletions docs/src/modules/utils/parseTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function findConformanceDescriptor(file) {
}

/**
*
* @param {import('@babel/core').Node} valueNode
* @returns {string | undefined}
*/
Expand Down Expand Up @@ -78,7 +77,6 @@ function getRefInstance(valueNode) {
}

/**
*
* @param {import('@babel/core').Node} valueNode - An Identifier
* @returns {string | undefined}
*/
Expand All @@ -87,7 +85,6 @@ function getInheritComponentName(valueNode) {
}

/**
*
* @param {string} componentFilename
* @returns {ParseResult}
*
Expand Down
8 changes: 4 additions & 4 deletions docs/src/pages/customization/breakpoints/breakpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ declare module '@material-ui/core/styles/createBreakpoints' {

#### Arguments

1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

Should we make these px?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are already px?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or did you mean px vs px?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, px rather than px?

Copy link
Member Author

@oliviertassinari oliviertassinari Sep 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fair, why not


#### Returns

Expand All @@ -175,7 +175,7 @@ const styles = (theme) => ({

#### Arguments

1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `key` (_String_ | _Number_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

#### Returns

Expand Down Expand Up @@ -227,8 +227,8 @@ const styles = (theme) => ({

#### Arguments

1. `start` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
2. `end` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in pixels.
1. `start` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
2. `end` (_String_): A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.

#### Returns

Expand Down
1 change: 0 additions & 1 deletion docs/src/pages/customization/default-theme/DefaultTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function getType(value) {
}

/**
*
* @param {unknown} value
* @param {ReturnType<typeof getType>} type
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/theming/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For instance:

## Theme builder

<video autoPlay muted width="320">
<video autoPlay muted loop width="320">
<source src="/static/studies.mp4" type="video/mp4" >
</video>

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/typography/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ To be done: [#15251](https://github.com/mui-org/material-ui/issues/15251).

You might want to change the `<html>` element default font size. For instance, when using the [10px simplification](https://www.sitepoint.com/understanding-and-using-rem-units-in-css/).

> ⚠️ Changing the font size can harm accessibility ♿️. Most browsers agreed on the default size of 16 pixels, but the user can change it. For instance, someone with an impaired vision could have set their browser’s default font size to something larger.
> ⚠️ Changing the font size can harm accessibility ♿️. Most browsers agreed on the default size of 16px, but the user can change it. For instance, someone with an impaired vision could have set their browser’s default font size to something larger.

The `theme.typography.htmlFontSize` property is provided for this use case,
which tells Material-UI what the font-size on the `<html>` element is.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/discover-more/roadmap/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ Here are the components we will work on being supported in the Material-UI ecosy
| Gantt Chart | ⏳⭐️ |
| Color Picker | ⏳⭐️ |

> ⚠️ **Forward looking statement.** We operate in a dynamic environment, and things are subject to change. The information provided here is intended to outline the general framework direction. It's intended for informational purposes only. We may decide to add/remove new items at any time depending on our capability to deliver while meeting our quality standards. The development, releases and timing of any features or functionality of Material-UI remains at the sole discretion of Material-UI. The roadmap does not represent a commitment, obligation or promise to deliver at any time. You should not depend on the roadmap when making technology decisions.
> ⚠️ **Disclaimer**: We operate in a dynamic environment, and things are subject to change. The information provided is intended to outline the general framework direction, for informational purposes only. We may decide to add or remove new items at any time, depending on our capability to deliver while meeting our quality standards. The development, releases, and timing of any features or functionality remains at the sole discretion of Material-UI. The roadmap does not represent a commitment, obligation, or promise to deliver at any time.
7 changes: 4 additions & 3 deletions docs/src/pages/getting-started/support/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For crowdsourced technical questions from expert Material-UI devs in our communi

### GitHub <img src="/static/images/logos/github.svg" width="24" height="24" alt="GitHub logo" loading="lazy" />

We use GitHub issues exclusively as a bugs and feature requests tracker.
We use GitHub issues exclusively as a bug and feature request tracker.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported or fixed](https://github.com/mui-org/material-ui/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aclosed). You can search through existing issues and pull requests to see if someone has reported one similar to yours.

[Open an issue](https://github.com/mui-org/material-ui/issues/new/choose)
Expand Down Expand Up @@ -55,8 +55,9 @@ The open-source community is always welcome to submit new features and bug fixes

The current status of each Material-UI version is as follows:

- Material-UI v4 (hooks): ✅ In active development.
- Material-UI v3 (change supported browsers): ⚠️ Only handle security fixes.
- Material-UI v5 (emotion): ✅ In active development.
- Material-UI v4 (hooks): ⚠️ Only handle security fixes.
- Material-UI v3 (change supported browsers): ❌ Inactive.
- ~Material-UI v2 (never existed)~.
- Material-UI v1 (rewrite): ❌ Inactive.
- Material-UI v0.x: ❌ Inactive.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/versions/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In general, you can expect the following release cycle:

You can follow the [milestones](https://github.com/mui-org/material-ui/milestones) for a more detailed overview.

> ⚠️ **Disclaimer**: We operate in a dynamic environment, and things are subject to change. The information provided is intended to outline the general framework direction. It's intended for informational purposes only. We may decide to add/remove new items at any time depending on our capability to deliver while meeting our quality standards. The development, releases and timing of any features or functionality of Material-UI remains at the sole discretion of Material-UI. The roadmap does not represent a commitment, obligation or promise to deliver at any time.
> ⚠️ **Disclaimer**: We operate in a dynamic environment, and things are subject to change. The information provided is intended to outline the general framework direction, for informational purposes only. We may decide to add or remove new items at any time, depending on our capability to deliver while meeting our quality standards. The development, releases, and timing of any features or functionality remains at the sole discretion of Material-UI. The roadmap does not represent a commitment, obligation, or promise to deliver at any time.

## Support policy

Expand Down
1 change: 0 additions & 1 deletion framer/Material-UI.framerfx/code/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import camelCase from 'lodash/camelCase';
/**
* Checks if the color string is a Framer Shared Color token and extracts
* the underlying color or returns the original string.
*
* @param {string} color - A Framer Shared Color Token/regular CSS color
* @returns {string} A valid HTML color string
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
/**
*
* @param {babel.types.ImportDeclaration} param0
*/
function isImportFromStyles({ source }) {
return source.value === '@material-ui/core/styles' || source.value === '@material-ui/styles';
}

/**
*
* @param {babel.types.CallExpression} param0
*/
function isCreateStylesCall({ callee }) {
return callee.name === 'createStyles';
}

/**
*
* @param {babel.types.ImportSpecifier} param0
*/
function isCreateStylesImportSpecifier({ imported }) {
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui-icons/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const svgo = new SVGO({

/**
* Return Pascal-Cased component name.
*
* @param {string} destPath
* @returns {string} class name
*/
Expand Down
3 changes: 0 additions & 3 deletions packages/material-ui-icons/renameFilters/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import path from 'path';

/*
* Return path to write file to inside outputDir.
*
* @param {object} svgPathObj
* path objects from path.parse
*
* @param {string} innerPath
* Path (relative to options.svgDir) to svg file
* e.g. if svgFile was /home/user/icons/path/to/svg/file.svg
* options.svgDir is /home/user/icons/
* innerPath is path/to/svg
*
* @param {object} options
* @returns {string} output file dest relative to outputDir
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { StyleRules } from '@material-ui/styles/withStyles';
* This function doesn't really "do anything" at runtime, it's just the identity
* function. Its only purpose is to defeat TypeScript's type widening when providing
* style rules to `withStyles` which are a function of the `Theme`.
*
* @param styles a set of style mappings
* @returns the same styles that were passed in
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function isEmpty(string) {
/**
* Generates string classKey based on the properties provided. It starts with the
* variant if defined, and then it appends all other properties in alphabetical order.
*
* @param {object} props - the properties for which the classKey should be created
*/
export default function propsToClassKey(props) {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-system/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export type BordersProps = PropsFor<typeof borders>;

// breakpoints.js
type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';

/**
*
* @returns An enhanced stylefunction that considers breakpoints
*/
export function breakpoints<Props, Breakpoints extends string = DefaultBreakPoints>(
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ type IfEquals<T, U, Y = unknown, N = never> = (<G>() => G extends T ? 1 : 2) ext
* @example `expectType<number | string, typeof value>(value)`
* TypeScript issues a type error since `value is not assignable to never`.
* This means `typeof value` is not identical to `number | string`
*
* @param actual
*/
export function expectType<Expected, Actual>(actual: IfEquals<Actual, Expected, Actual>): void;
1 change: 0 additions & 1 deletion packages/material-ui-utils/macros/MuiError.macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function invertObject(object) {
}

/**
*
* @param {import('babel-plugin-macros').MacroParams} param0
*/
function muiError({ references, babel, config }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Chip/Chip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export interface ChipTypeMap<P = {}, D extends React.ElementType = 'div'> {
*/
label?: React.ReactNode;
/**
* Callback function fired when the delete icon is clicked.
* Callback fired when the delete icon is clicked.
* If set, the delete icon will be shown.
*/
onDelete?: React.EventHandler<any>;
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Chip.propTypes = {
*/
onClick: PropTypes.func,
/**
* Callback function fired when the delete icon is clicked.
* Callback fired when the delete icon is clicked.
* If set, the delete icon will be shown.
*/
onDelete: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/NativeSelect/NativeSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface NativeSelectProps
*/
inputProps?: NativeSelectInputProps;
/**
* Callback function fired when a menu item is selected.
* Callback fired when a menu item is selected.
*
* @param {object} event The event source of the callback.
* You can pull out the new value by accessing `event.target.value` (string).
Expand Down
Loading