From 9b5154753b70d6cb8200bdde5a61c5197f659c73 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Mon, 25 Jan 2021 09:00:49 +0100 Subject: [PATCH] [docs] Add API of picker components (#24497) --- .stylelintrc.js | 5 + docs/pages/api-docs/desktop-time-picker.js | 23 +++ docs/pages/api-docs/desktop-time-picker.json | 70 +++++++++ docs/pages/api-docs/mobile-time-picker.js | 23 +++ docs/pages/api-docs/mobile-time-picker.json | 75 +++++++++ docs/pages/api-docs/static-time-picker.js | 23 +++ docs/pages/api-docs/static-time-picker.json | 71 +++++++++ docs/pages/api-docs/time-picker.js | 23 +++ docs/pages/api-docs/time-picker.json | 78 ++++++++++ docs/scripts/buildApi.ts | 95 ++++++++---- docs/src/modules/utils/defaultPropsHandler.js | 146 ++++++++++++++---- .../utils/findAnnotatedComponentsResolver.js | 74 +++++++++ .../desktop-time-picker-de.json | 46 ++++++ .../desktop-time-picker-es.json | 46 ++++++ .../desktop-time-picker-fr.json | 46 ++++++ .../desktop-time-picker-ja.json | 46 ++++++ .../desktop-time-picker-pt.json | 46 ++++++ .../desktop-time-picker-ru.json | 46 ++++++ .../desktop-time-picker-zh.json | 46 ++++++ .../desktop-time-picker.json | 46 ++++++ .../mobile-time-picker-de.json | 51 ++++++ .../mobile-time-picker-es.json | 51 ++++++ .../mobile-time-picker-fr.json | 51 ++++++ .../mobile-time-picker-ja.json | 51 ++++++ .../mobile-time-picker-pt.json | 51 ++++++ .../mobile-time-picker-ru.json | 51 ++++++ .../mobile-time-picker-zh.json | 51 ++++++ .../mobile-time-picker.json | 51 ++++++ .../static-time-picker-de.json | 45 ++++++ .../static-time-picker-es.json | 45 ++++++ .../static-time-picker-fr.json | 45 ++++++ .../static-time-picker-ja.json | 45 ++++++ .../static-time-picker-pt.json | 45 ++++++ .../static-time-picker-ru.json | 45 ++++++ .../static-time-picker-zh.json | 45 ++++++ .../static-time-picker.json | 45 ++++++ .../api-docs/time-picker/time-picker-de.json | 54 +++++++ .../api-docs/time-picker/time-picker-es.json | 54 +++++++ .../api-docs/time-picker/time-picker-fr.json | 54 +++++++ .../api-docs/time-picker/time-picker-ja.json | 54 +++++++ .../api-docs/time-picker/time-picker-pt.json | 54 +++++++ .../api-docs/time-picker/time-picker-ru.json | 54 +++++++ .../api-docs/time-picker/time-picker-zh.json | 54 +++++++ .../api-docs/time-picker/time-picker.json | 54 +++++++ docs/types/react-docgen.d.ts | 48 +++++- .../DesktopTimePicker.test.tsx | 24 ++- .../DesktopTimePicker/DesktopTimePicker.tsx | 9 +- .../MobileTimePicker.test.tsx | 57 ++++--- .../src/MobileTimePicker/MobileTimePicker.tsx | 9 +- .../StaticTimePicker.test.tsx | 31 ++++ .../src/StaticTimePicker/StaticTimePicker.tsx | 9 +- .../src/TimePicker/TimePicker.test.tsx | 24 +++ .../src/TimePicker/TimePicker.tsx | 17 +- .../src/internal/pickers/test-utils.tsx | 9 +- .../typescript-to-proptypes/src/injector.ts | 2 +- scripts/generateProptypes.ts | 4 - test/utils/describeConformance.js | 6 +- 57 files changed, 2413 insertions(+), 110 deletions(-) create mode 100644 docs/pages/api-docs/desktop-time-picker.js create mode 100644 docs/pages/api-docs/desktop-time-picker.json create mode 100644 docs/pages/api-docs/mobile-time-picker.js create mode 100644 docs/pages/api-docs/mobile-time-picker.json create mode 100644 docs/pages/api-docs/static-time-picker.js create mode 100644 docs/pages/api-docs/static-time-picker.json create mode 100644 docs/pages/api-docs/time-picker.js create mode 100644 docs/pages/api-docs/time-picker.json create mode 100644 docs/src/modules/utils/findAnnotatedComponentsResolver.js create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-de.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-es.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-fr.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ja.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-pt.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ru.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker-zh.json create mode 100644 docs/translations/api-docs/desktop-time-picker/desktop-time-picker.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-de.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-es.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-fr.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ja.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-pt.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ru.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker-zh.json create mode 100644 docs/translations/api-docs/mobile-time-picker/mobile-time-picker.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-de.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-es.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-fr.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-ja.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-pt.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-ru.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker-zh.json create mode 100644 docs/translations/api-docs/static-time-picker/static-time-picker.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-de.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-es.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-fr.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-ja.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-pt.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-ru.json create mode 100644 docs/translations/api-docs/time-picker/time-picker-zh.json create mode 100644 docs/translations/api-docs/time-picker/time-picker.json create mode 100644 packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx create mode 100644 packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx diff --git a/.stylelintrc.js b/.stylelintrc.js index 059de2fca134a1..12f7a1c2197b6e 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -1,6 +1,11 @@ module.exports = { processors: ['stylelint-processor-styled-components'], extends: 'stylelint-config-standard', + ignoreFiles: [ + // TypeScript declaration files contain no styles. + // Stylelint is also reporting parseError on `docs/types/react-docgen.d.ts`. + '**/*.d.ts', + ], rules: { 'value-no-vendor-prefix': true, 'property-no-vendor-prefix': true, diff --git a/docs/pages/api-docs/desktop-time-picker.js b/docs/pages/api-docs/desktop-time-picker.js new file mode 100644 index 00000000000000..f92ef485a7ea03 --- /dev/null +++ b/docs/pages/api-docs/desktop-time-picker.js @@ -0,0 +1,23 @@ +import * as React from 'react'; +import ApiPage from 'docs/src/modules/components/ApiPage'; +import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; +import jsonPageContent from './desktop-time-picker.json'; + +export default function Page(props) { + const { descriptions, pageContent } = props; + return ; +} + +Page.getInitialProps = () => { + const req = require.context( + 'docs/translations/api-docs/desktop-time-picker', + false, + /desktop-time-picker.*.json$/, + ); + const descriptions = mapApiPageTranslations(req); + + return { + descriptions, + pageContent: jsonPageContent, + }; +}; diff --git a/docs/pages/api-docs/desktop-time-picker.json b/docs/pages/api-docs/desktop-time-picker.json new file mode 100644 index 00000000000000..df0a6818571cd0 --- /dev/null +++ b/docs/pages/api-docs/desktop-time-picker.json @@ -0,0 +1,70 @@ +{ + "props": { + "onChange": { "type": { "name": "func" }, "required": true }, + "renderInput": { "type": { "name": "func" }, "required": true }, + "acceptRegex": { "type": { "name": "instanceOf", "description": "RegExp" } }, + "allowKeyboardControl": { "type": { "name": "bool" } }, + "ampm": { "type": { "name": "bool" } }, + "ampmInClock": { "type": { "name": "bool" } }, + "className": { "type": { "name": "string" } }, + "dateAdapter": { "type": { "name": "object" } }, + "disableCloseOnSelect": { "type": { "name": "bool" } }, + "disabled": { "type": { "name": "bool" } }, + "disableIgnoringDatePartForTimeValidation": { "type": { "name": "bool" } }, + "disableMaskedInput": { "type": { "name": "bool" } }, + "disableOpenPicker": { "type": { "name": "bool" } }, + "getClockLabelText": { "type": { "name": "func" } }, + "getOpenDialogAriaText": { "type": { "name": "func" } }, + "InputAdornmentProps": { "type": { "name": "object" } }, + "inputFormat": { "type": { "name": "string" } }, + "mask": { "type": { "name": "string" } }, + "minutesStep": { "type": { "name": "number" } }, + "onAccept": { "type": { "name": "func" } }, + "onClose": { "type": { "name": "func" } }, + "onError": { "type": { "name": "func" } }, + "onOpen": { "type": { "name": "func" } }, + "open": { "type": { "name": "bool" } }, + "OpenPickerButtonProps": { "type": { "name": "object" } }, + "openPickerIcon": { "type": { "name": "node" } }, + "openTo": { + "type": { + "name": "enum", + "description": "'date'
| 'hours'
| 'minutes'
| 'month'
| 'seconds'
| 'year'" + } + }, + "orientation": { + "type": { "name": "enum", "description": "'landscape'
| 'portrait'" } + }, + "PopperProps": { "type": { "name": "object" } }, + "readOnly": { "type": { "name": "bool" } }, + "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableTime": { "type": { "name": "func" } }, + "showToolbar": { "type": { "name": "bool" } }, + "ToolbarComponent": { "type": { "name": "elementType" } }, + "toolbarFormat": { "type": { "name": "string" } }, + "toolbarPlaceholder": { "type": { "name": "node" } }, + "toolbarTitle": { "type": { "name": "node" } }, + "TransitionComponent": { "type": { "name": "elementType" } }, + "value": { + "type": { + "name": "union", + "description": "any
| Date
| number
| string" + } + }, + "views": { + "type": { + "name": "arrayOf", + "description": "Array<'hours'
| 'minutes'
| 'seconds'>" + } + } + }, + "name": "DesktopTimePicker", + "styles": { "classes": [], "globalClasses": {}, "name": null }, + "spread": false, + "forwardsRefTo": "HTMLInputElement", + "filename": "/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.tsx", + "inheritance": null, + "demos": "", + "styledComponent": true, + "cssComponent": false +} diff --git a/docs/pages/api-docs/mobile-time-picker.js b/docs/pages/api-docs/mobile-time-picker.js new file mode 100644 index 00000000000000..ba189fa14c47d5 --- /dev/null +++ b/docs/pages/api-docs/mobile-time-picker.js @@ -0,0 +1,23 @@ +import * as React from 'react'; +import ApiPage from 'docs/src/modules/components/ApiPage'; +import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; +import jsonPageContent from './mobile-time-picker.json'; + +export default function Page(props) { + const { descriptions, pageContent } = props; + return ; +} + +Page.getInitialProps = () => { + const req = require.context( + 'docs/translations/api-docs/mobile-time-picker', + false, + /mobile-time-picker.*.json$/, + ); + const descriptions = mapApiPageTranslations(req); + + return { + descriptions, + pageContent: jsonPageContent, + }; +}; diff --git a/docs/pages/api-docs/mobile-time-picker.json b/docs/pages/api-docs/mobile-time-picker.json new file mode 100644 index 00000000000000..2eca705d3770df --- /dev/null +++ b/docs/pages/api-docs/mobile-time-picker.json @@ -0,0 +1,75 @@ +{ + "props": { + "onChange": { "type": { "name": "func" }, "required": true }, + "renderInput": { "type": { "name": "func" }, "required": true }, + "acceptRegex": { "type": { "name": "instanceOf", "description": "RegExp" } }, + "allowKeyboardControl": { "type": { "name": "bool" } }, + "ampm": { "type": { "name": "bool" } }, + "ampmInClock": { "type": { "name": "bool" } }, + "cancelText": { "type": { "name": "node" } }, + "className": { "type": { "name": "string" } }, + "clearable": { "type": { "name": "bool" } }, + "clearText": { "type": { "name": "node" } }, + "dateAdapter": { "type": { "name": "object" } }, + "DialogProps": { "type": { "name": "object" } }, + "disableCloseOnSelect": { "type": { "name": "bool" } }, + "disabled": { "type": { "name": "bool" } }, + "disableIgnoringDatePartForTimeValidation": { "type": { "name": "bool" } }, + "disableMaskedInput": { "type": { "name": "bool" } }, + "disableOpenPicker": { "type": { "name": "bool" } }, + "getClockLabelText": { "type": { "name": "func" } }, + "getOpenDialogAriaText": { "type": { "name": "func" } }, + "InputAdornmentProps": { "type": { "name": "object" } }, + "inputFormat": { "type": { "name": "string" } }, + "mask": { "type": { "name": "string" } }, + "minutesStep": { "type": { "name": "number" } }, + "okText": { "type": { "name": "node" } }, + "onAccept": { "type": { "name": "func" } }, + "onClose": { "type": { "name": "func" } }, + "onError": { "type": { "name": "func" } }, + "onOpen": { "type": { "name": "func" } }, + "open": { "type": { "name": "bool" } }, + "OpenPickerButtonProps": { "type": { "name": "object" } }, + "openPickerIcon": { "type": { "name": "node" } }, + "openTo": { + "type": { + "name": "enum", + "description": "'date'
| 'hours'
| 'minutes'
| 'month'
| 'seconds'
| 'year'" + } + }, + "orientation": { + "type": { "name": "enum", "description": "'landscape'
| 'portrait'" } + }, + "readOnly": { "type": { "name": "bool" } }, + "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableTime": { "type": { "name": "func" } }, + "showTodayButton": { "type": { "name": "bool" } }, + "showToolbar": { "type": { "name": "bool" } }, + "todayText": { "type": { "name": "node" } }, + "ToolbarComponent": { "type": { "name": "elementType" } }, + "toolbarFormat": { "type": { "name": "string" } }, + "toolbarPlaceholder": { "type": { "name": "node" } }, + "toolbarTitle": { "type": { "name": "node" } }, + "value": { + "type": { + "name": "union", + "description": "any
| Date
| number
| string" + } + }, + "views": { + "type": { + "name": "arrayOf", + "description": "Array<'hours'
| 'minutes'
| 'seconds'>" + } + } + }, + "name": "MobileTimePicker", + "styles": { "classes": [], "globalClasses": {}, "name": null }, + "spread": false, + "forwardsRefTo": "HTMLInputElement", + "filename": "/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.tsx", + "inheritance": null, + "demos": "", + "styledComponent": true, + "cssComponent": false +} diff --git a/docs/pages/api-docs/static-time-picker.js b/docs/pages/api-docs/static-time-picker.js new file mode 100644 index 00000000000000..09624bb4b1610d --- /dev/null +++ b/docs/pages/api-docs/static-time-picker.js @@ -0,0 +1,23 @@ +import * as React from 'react'; +import ApiPage from 'docs/src/modules/components/ApiPage'; +import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; +import jsonPageContent from './static-time-picker.json'; + +export default function Page(props) { + const { descriptions, pageContent } = props; + return ; +} + +Page.getInitialProps = () => { + const req = require.context( + 'docs/translations/api-docs/static-time-picker', + false, + /static-time-picker.*.json$/, + ); + const descriptions = mapApiPageTranslations(req); + + return { + descriptions, + pageContent: jsonPageContent, + }; +}; diff --git a/docs/pages/api-docs/static-time-picker.json b/docs/pages/api-docs/static-time-picker.json new file mode 100644 index 00000000000000..ba2c4a956616fd --- /dev/null +++ b/docs/pages/api-docs/static-time-picker.json @@ -0,0 +1,71 @@ +{ + "props": { + "onChange": { "type": { "name": "func" }, "required": true }, + "renderInput": { "type": { "name": "func" }, "required": true }, + "acceptRegex": { "type": { "name": "instanceOf", "description": "RegExp" } }, + "allowKeyboardControl": { "type": { "name": "bool" } }, + "ampm": { "type": { "name": "bool" } }, + "ampmInClock": { "type": { "name": "bool" } }, + "className": { "type": { "name": "string" } }, + "dateAdapter": { "type": { "name": "object" } }, + "disableCloseOnSelect": { "type": { "name": "bool" } }, + "disabled": { "type": { "name": "bool" } }, + "disableIgnoringDatePartForTimeValidation": { "type": { "name": "bool" } }, + "disableMaskedInput": { "type": { "name": "bool" } }, + "disableOpenPicker": { "type": { "name": "bool" } }, + "displayStaticWrapperAs": { + "type": { "name": "enum", "description": "'desktop'
| 'mobile'" } + }, + "getClockLabelText": { "type": { "name": "func" } }, + "getOpenDialogAriaText": { "type": { "name": "func" } }, + "InputAdornmentProps": { "type": { "name": "object" } }, + "inputFormat": { "type": { "name": "string" } }, + "mask": { "type": { "name": "string" } }, + "minutesStep": { "type": { "name": "number" } }, + "onAccept": { "type": { "name": "func" } }, + "onClose": { "type": { "name": "func" } }, + "onError": { "type": { "name": "func" } }, + "onOpen": { "type": { "name": "func" } }, + "open": { "type": { "name": "bool" } }, + "OpenPickerButtonProps": { "type": { "name": "object" } }, + "openPickerIcon": { "type": { "name": "node" } }, + "openTo": { + "type": { + "name": "enum", + "description": "'date'
| 'hours'
| 'minutes'
| 'month'
| 'seconds'
| 'year'" + } + }, + "orientation": { + "type": { "name": "enum", "description": "'landscape'
| 'portrait'" } + }, + "readOnly": { "type": { "name": "bool" } }, + "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableTime": { "type": { "name": "func" } }, + "showToolbar": { "type": { "name": "bool" } }, + "ToolbarComponent": { "type": { "name": "elementType" } }, + "toolbarFormat": { "type": { "name": "string" } }, + "toolbarPlaceholder": { "type": { "name": "node" } }, + "toolbarTitle": { "type": { "name": "node" } }, + "value": { + "type": { + "name": "union", + "description": "any
| Date
| number
| string" + } + }, + "views": { + "type": { + "name": "arrayOf", + "description": "Array<'hours'
| 'minutes'
| 'seconds'>" + } + } + }, + "name": "StaticTimePicker", + "styles": { "classes": [], "globalClasses": {}, "name": null }, + "spread": false, + "forwardsRefTo": "undefined", + "filename": "/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.tsx", + "inheritance": null, + "demos": "", + "styledComponent": true, + "cssComponent": false +} diff --git a/docs/pages/api-docs/time-picker.js b/docs/pages/api-docs/time-picker.js new file mode 100644 index 00000000000000..8ac417ff3dc7a9 --- /dev/null +++ b/docs/pages/api-docs/time-picker.js @@ -0,0 +1,23 @@ +import * as React from 'react'; +import ApiPage from 'docs/src/modules/components/ApiPage'; +import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; +import jsonPageContent from './time-picker.json'; + +export default function Page(props) { + const { descriptions, pageContent } = props; + return ; +} + +Page.getInitialProps = () => { + const req = require.context( + 'docs/translations/api-docs/time-picker', + false, + /time-picker.*.json$/, + ); + const descriptions = mapApiPageTranslations(req); + + return { + descriptions, + pageContent: jsonPageContent, + }; +}; diff --git a/docs/pages/api-docs/time-picker.json b/docs/pages/api-docs/time-picker.json new file mode 100644 index 00000000000000..d3f6265ad9c36c --- /dev/null +++ b/docs/pages/api-docs/time-picker.json @@ -0,0 +1,78 @@ +{ + "props": { + "onChange": { "type": { "name": "func" }, "required": true }, + "renderInput": { "type": { "name": "func" }, "required": true }, + "acceptRegex": { "type": { "name": "instanceOf", "description": "RegExp" } }, + "allowKeyboardControl": { "type": { "name": "bool" } }, + "ampm": { "type": { "name": "bool" } }, + "ampmInClock": { "type": { "name": "bool" } }, + "cancelText": { "type": { "name": "node" } }, + "className": { "type": { "name": "string" } }, + "clearable": { "type": { "name": "bool" } }, + "clearText": { "type": { "name": "node" } }, + "dateAdapter": { "type": { "name": "object" } }, + "desktopModeMediaQuery": { "type": { "name": "string" } }, + "DialogProps": { "type": { "name": "object" } }, + "disableCloseOnSelect": { "type": { "name": "bool" } }, + "disabled": { "type": { "name": "bool" } }, + "disableIgnoringDatePartForTimeValidation": { "type": { "name": "bool" } }, + "disableMaskedInput": { "type": { "name": "bool" } }, + "disableOpenPicker": { "type": { "name": "bool" } }, + "getClockLabelText": { "type": { "name": "func" } }, + "getOpenDialogAriaText": { "type": { "name": "func" } }, + "InputAdornmentProps": { "type": { "name": "object" } }, + "inputFormat": { "type": { "name": "string" } }, + "mask": { "type": { "name": "string" } }, + "minutesStep": { "type": { "name": "number" } }, + "okText": { "type": { "name": "node" } }, + "onAccept": { "type": { "name": "func" } }, + "onClose": { "type": { "name": "func" } }, + "onError": { "type": { "name": "func" } }, + "onOpen": { "type": { "name": "func" } }, + "open": { "type": { "name": "bool" } }, + "OpenPickerButtonProps": { "type": { "name": "object" } }, + "openPickerIcon": { "type": { "name": "node" } }, + "openTo": { + "type": { + "name": "enum", + "description": "'date'
| 'hours'
| 'minutes'
| 'month'
| 'seconds'
| 'year'" + } + }, + "orientation": { + "type": { "name": "enum", "description": "'landscape'
| 'portrait'" } + }, + "PopperProps": { "type": { "name": "object" } }, + "readOnly": { "type": { "name": "bool" } }, + "rifmFormatter": { "type": { "name": "func" } }, + "shouldDisableTime": { "type": { "name": "func" } }, + "showTodayButton": { "type": { "name": "bool" } }, + "showToolbar": { "type": { "name": "bool" } }, + "todayText": { "type": { "name": "node" } }, + "ToolbarComponent": { "type": { "name": "elementType" } }, + "toolbarFormat": { "type": { "name": "string" } }, + "toolbarPlaceholder": { "type": { "name": "node" } }, + "toolbarTitle": { "type": { "name": "node" } }, + "TransitionComponent": { "type": { "name": "elementType" } }, + "value": { + "type": { + "name": "union", + "description": "any
| Date
| number
| string" + } + }, + "views": { + "type": { + "name": "arrayOf", + "description": "Array<'hours'
| 'minutes'
| 'seconds'>" + } + } + }, + "name": "TimePicker", + "styles": { "classes": [], "globalClasses": {}, "name": null }, + "spread": false, + "forwardsRefTo": "HTMLInputElement", + "filename": "/packages/material-ui-lab/src/TimePicker/TimePicker.tsx", + "inheritance": null, + "demos": "", + "styledComponent": true, + "cssComponent": false +} diff --git a/docs/scripts/buildApi.ts b/docs/scripts/buildApi.ts index bf8f2cce17532e..2157af6cb271d2 100644 --- a/docs/scripts/buildApi.ts +++ b/docs/scripts/buildApi.ts @@ -13,12 +13,14 @@ import * as yargs from 'yargs'; import * as doctrine from 'doctrine'; import { defaultHandlers, + resolver, parse as docgenParse, PropDescriptor, PropTypeDescriptor, ReactDocgenApi, } from 'react-docgen'; import muiDefaultPropsHandler from 'docs/src/modules/utils/defaultPropsHandler'; +import muiFindAnnotatedComponentsResolver from 'docs/src/modules/utils/findAnnotatedComponentsResolver'; import { LANGUAGES, LANGUAGES_IN_PROGRESS } from 'docs/src/modules/constants'; import parseTest from 'docs/src/modules/utils/parseTest'; import { findPagesMarkdown, findComponents } from 'docs/src/modules/utils/find'; @@ -442,25 +444,21 @@ function getInheritance( * why the source includes relative url. We transform them to absolute urls with * this method. */ -function computeApiDescription(api: ReactApi, options: { host: string }): Promise { +async function computeApiDescription(api: ReactApi, options: { host: string }): Promise { const { host } = options; - return new Promise((resolve, reject) => { - remark() - .use(function docsLinksAttacher() { - return function transformer(tree) { - remarkVisit(tree, 'link', (linkNode) => { - if ((linkNode.url as string).startsWith('/')) { - linkNode.url = `${host}${linkNode.url}`; - } - }); - }; - }) - .process(api.description, (error, file) => { - if (error) reject(error); + const file = await remark() + .use(function docsLinksAttacher() { + return function transformer(tree) { + remarkVisit(tree, 'link', (linkNode) => { + if ((linkNode.url as string).startsWith('/')) { + linkNode.url = `${host}${linkNode.url}`; + } + }); + }; + }) + .process(api.description); - resolve(file.contents.toString('utf-8').trim()); - }); - }); + return file.contents.toString('utf-8').trim(); } /** @@ -512,9 +510,19 @@ async function annotateComponentDefinition(context: { } const { leadingComments } = node; - const jsdocBlock = leadingComments != null ? leadingComments[0] : null; - if (leadingComments != null && leadingComments.length > 1) { - throw new Error('Should only have a single leading jsdoc block'); + const leadingCommentBlocks = + leadingComments != null + ? leadingComments.filter(({ type }) => type === 'CommentBlock') + : null; + const jsdocBlock = leadingCommentBlocks != null ? leadingCommentBlocks[0] : null; + if (leadingCommentBlocks != null && leadingCommentBlocks.length > 1) { + throw new Error( + `Should only have a single leading jsdoc block but got ${ + leadingCommentBlocks.length + }:\n${leadingCommentBlocks + .map(({ type, value }, index) => `#${index} (${type}): ${value}`) + .join('\n')}`, + ); } if (jsdocBlock != null) { start = jsdocBlock.start; @@ -865,6 +873,41 @@ function normalizePath(filepath: string): string { return filepath.replace(/\\/g, '/'); } +async function parseComponentSource( + src: string, + componentObject: { filename: string }, +): Promise { + const reactAPI: ReactApi = docgenParse( + src, + // Use `findExportedComponentDefinition` and fallback to `muiFindAnnotatedComponentsResolver` + // `findExportedComponentDefinition` was the default resolver: https://github.com/reactjs/react-docgen/blob/aba7250ff5fde608ee6af7c286b15476d1b5bb99/src/main.js#L19 + (ast, parser, importer) => { + const defaultResolvedDefinition = resolver.findExportedComponentDefinition( + ast, + parser, + importer, + ); + if (defaultResolvedDefinition !== undefined) { + return defaultResolvedDefinition; + } + return muiFindAnnotatedComponentsResolver(ast, parser, importer); + }, + defaultHandlers.concat(muiDefaultPropsHandler), + { + filename: componentObject.filename, + }, + ); + + const fullDescription = reactAPI.description; + // Ignore what we might have generated in `annotateComponentDefinition` + const annotatedDescriptionMatch = fullDescription.match(/(Demos|API):\r?\n\r?\n/); + if (annotatedDescriptionMatch !== null) { + reactAPI.description = fullDescription.slice(0, annotatedDescriptionMatch.index); + } + + return reactAPI; +} + async function buildDocs(options: { component: { filename: string }; pagesMarkdown: Array<{ components: string[]; filename: string; pathname: string }>; @@ -966,15 +1009,7 @@ async function buildDocs(options: { } } - let reactApi: ReactApi; - try { - reactApi = docgenParse(src, null, defaultHandlers.concat(muiDefaultPropsHandler), { - filename: componentObject.filename, - }); - } catch (err) { - console.error('Error parsing src for', componentObject.filename); - throw err; - } + const reactApi: ReactApi = await parseComponentSource(src, componentObject); const componentApi: { componentDescription: string; @@ -1329,7 +1364,7 @@ function run(argv: { componentDirectories?: string[]; grep?: string; outputDirec return { status: 'fulfilled' as const }; }) .catch((error) => { - error.message = `with component ${component.filename}: ${error.message}`; + error.message = `${component.filename}: ${error.message}`; return { status: 'rejected' as const, reason: error }; }); diff --git a/docs/src/modules/utils/defaultPropsHandler.js b/docs/src/modules/utils/defaultPropsHandler.js index b18760e5a4b95f..dcc5173284be8f 100644 --- a/docs/src/modules/utils/defaultPropsHandler.js +++ b/docs/src/modules/utils/defaultPropsHandler.js @@ -1,6 +1,8 @@ +// @ts-check const astTypes = require('ast-types'); const { parse: parseDoctrine } = require('doctrine'); const { utils: docgenUtils } = require('react-docgen'); +const { isAnnotatedComponent } = require('./findAnnotatedComponentsResolver'); const { getPropertyName, isReactForwardRefCall, printValue, resolveToValue } = docgenUtils; @@ -9,30 +11,47 @@ const { getPropertyName, isReactForwardRefCall, printValue, resolveToValue } = d const { namedTypes: types } = astTypes; -function getDefaultValue(propertyPath) { +/** + * @param {import('react-docgen').NodePath} propertyPath + * @param {import('react-docgen').Importer} importer + * @returns {{ value: string; computed: boolean } | null} + */ +function getDefaultValue(propertyPath, importer) { if (!types.AssignmentPattern.check(propertyPath.get('value').node)) { return null; } + /** + * @type import('react-docgen').NodePath + */ let path = propertyPath.get('value', 'right'); - let node = path.node; + + /** + * @type {string|undefined} + */ let defaultValue; - if (types.Literal.check(node)) { + if (types.Literal.check(path.node)) { + // @ts-expect-error TODO upstream fix defaultValue = node.raw; } else { if (types.AssignmentPattern.check(path.node)) { - path = resolveToValue(path.get('right')); + path = resolveToValue(path.get('right'), importer); } else { - path = resolveToValue(path); + path = resolveToValue(path, importer); } if (types.ImportDeclaration.check(path.node)) { + if (!types.Identifier.check(node)) { + throw new TypeError( + `Unable to follow data flow. Expected an 'Identifier' resolve to an 'ImportDeclaration'. Instead attempted to resolve a '${node.type}'.`, + ); + } defaultValue = node.name; } else { node = path.node; defaultValue = printValue(path); } } - if (typeof defaultValue !== 'undefined') { + if (defaultValue !== undefined) { return { value: defaultValue, computed: @@ -45,25 +64,50 @@ function getDefaultValue(propertyPath) { return null; } +/** + * + * @param {import('doctrine').Annotation} jsdoc + * @return {{ value: string } | undefined} + */ function getJsdocDefaultValue(jsdoc) { const defaultTag = jsdoc.tags.find((tag) => tag.title === 'default'); if (defaultTag === undefined) { return undefined; } - return { value: defaultTag.description }; + return { value: defaultTag.description || '' }; } -function getDefaultValuesFromProps(properties, documentation) { +/** + * @param {import('react-docgen').NodePath} properties + * @param {import('react-docgen').Documentation} documentation + * @param {import('react-docgen').Importer} importer + * @returns {void} + */ +function getDefaultValuesFromProps(properties, documentation, importer) { const { props: documentedProps } = documentation.toObject(); + /** + * @type Record + */ const implementedProps = {}; properties - .filter((propertyPath) => types.Property.check(propertyPath.node)) - .forEach((propertyPath) => { - const propName = getPropertyName(propertyPath); - if (propName) { - implementedProps[propName] = propertyPath; - } - }); + .filter( + /** + * @param {import('react-docgen').NodePath} propertyPath + */ + (propertyPath) => types.Property.check(propertyPath.node), + undefined, + ) + .forEach( + /** + * @param {import('react-docgen').NodePath} propertyPath + */ + (propertyPath) => { + const propName = getPropertyName(propertyPath); + if (propName) { + implementedProps[propName] = propertyPath; + } + }, + ); // Sometimes we list props in .propTypes even though they're implemented by another component // These props are spread so they won't appear in the component implementation. @@ -87,7 +131,7 @@ function getDefaultValuesFromProps(properties, documentation) { const propertyPath = implementedProps[propName]; if (propertyPath !== undefined) { - const defaultValue = getDefaultValue(propertyPath); + const defaultValue = getDefaultValue(propertyPath, importer); if (defaultValue) { propDescriptor.defaultValue = defaultValue; } @@ -97,35 +141,71 @@ function getDefaultValuesFromProps(properties, documentation) { }); } -function getRenderBody(componentDefinition) { - const value = resolveToValue(componentDefinition); - if (isReactForwardRefCall(value)) { +/** + * @param {import('react-docgen').NodePath} componentDefinition + * @param {import('react-docgen').Importer} importer + * @returns import('react-docgen').NodePath + */ +function getRenderBody(componentDefinition, importer) { + const value = resolveToValue(componentDefinition, importer); + if (isReactForwardRefCall(value, importer)) { return value.get('arguments', 0, 'body', 'body'); } return value.get('body', 'body'); } +/** + * @param {import('react-docgen').NodePath} functionBody + * @returns import('react-docgen').NodePath | undefined + */ function getPropsPath(functionBody) { + /** + * @type import('react-docgen').NodePath | undefined + */ let propsPath; // visitVariableDeclarator, can't use visit body.node since it looses scope information functionBody - .filter((path) => { - return types.VariableDeclaration.check(path.node); - }) - .forEach((path) => { - const declaratorPath = path.get('declarations', 0); - if (declaratorPath.get('init', 'name').value === 'props') { - propsPath = declaratorPath.get('id'); - } - }); + .filter( + /** + * @param {import('react-docgen').NodePath} path + */ + (path) => { + return types.VariableDeclaration.check(path.node); + }, + undefined, + ) + .forEach( + /** + * @param {import('react-docgen').NodePath} path + */ + (path) => { + const declaratorPath = path.get('declarations', 0); + if (declaratorPath.get('init', 'name').value === 'props') { + propsPath = declaratorPath.get('id'); + } + }, + ); return propsPath; } -module.exports = function defaultPropsHandler(documentation, componentDefinition) { - const renderBody = getRenderBody(componentDefinition); - const props = getPropsPath(renderBody); - if (props !== undefined) { - getDefaultValuesFromProps(props.get('properties'), documentation); +/** + * @type {import('react-docgen').Handler} + */ +const defaultPropsHandler = (documentation, componentDefinition, importer) => { + if (isAnnotatedComponent(componentDefinition)) { + Object.values(documentation.toObject().props).forEach((propDescriptor) => { + // For annotated components static analysis already breaks down. + // Props can be considered external i.e. we can't verify if the documented default value matches at runtime. + propDescriptor.external = true; + }); + } else { + const renderBody = getRenderBody(componentDefinition, importer); + const props = getPropsPath(renderBody); + if (props !== undefined) { + getDefaultValuesFromProps(props.get('properties'), documentation, importer); + } } }; + +module.exports = defaultPropsHandler; diff --git a/docs/src/modules/utils/findAnnotatedComponentsResolver.js b/docs/src/modules/utils/findAnnotatedComponentsResolver.js new file mode 100644 index 00000000000000..2dafe5494ac7bb --- /dev/null +++ b/docs/src/modules/utils/findAnnotatedComponentsResolver.js @@ -0,0 +1,74 @@ +// @ts-check +const { namedTypes: t, visit } = require('ast-types'); + +/** + * @param {import('react-docgen').NodePath} declaration + * @returns {boolean} + */ +function isAnnotatedComponent(declaration) { + // Check if we have: + // /* @typescript-to-proptypes-generate */ + // const Component = ... + /** + * @type {import('react-docgen').NodePath} + */ + const leadingComments = declaration.get('leadingComments'); + if (leadingComments.value === undefined) { + return false; + } + + return leadingComments.value.some(({ value }) => { + return value.trim() === '@typescript-to-proptypes-generate'; + }); +} + +/** + * @remarks Base on https://github.com/reactjs/react-docgen/blob/master/src/resolver/findExportedComponentDefinition.js + * @type {import('react-docgen').Resolver} + */ +const findAnnotatedComponentsResolver = (ast) => { + /** + * @type {import('react-docgen').NodePath | undefined} + */ + let foundAnnotatedComponent; + + /** + * @param {import('react-docgen').NodePath} path + * @returns {boolean} + */ + function exportDeclaration(path) { + /** + * @type {import('react-docgen').NodePath} + */ + const declarationPath = path.get('declaration'); + if (t.Identifier.check(declarationPath.node)) { + const exportedValueScope = path.scope.lookup(declarationPath.node.name); + const exportedValueScopeBindings = exportedValueScope.getBindings(); + const [exportedValueBinding] = exportedValueScopeBindings[declarationPath.node.name]; + // `exportedValueBinding` points to `Component` in `const Component`; + // `exportedValueBinding.parentPath` is the `VariableDeclarator` + // `exportedValueBinding.parentPath.parentPath` is the `VariableDeclaration` + // `exportedValueBinding.parentPath.parentPath.parentPath` is the `VariableDeclaration` as well + const declaration = exportedValueBinding.parentPath.parentPath.parentPath; + + if (isAnnotatedComponent(declaration)) { + if (foundAnnotatedComponent !== undefined) { + throw new Error('Unable to handle multiple annotated components.'); + } + + foundAnnotatedComponent = declaration; + } + } + + return false; + } + + visit(ast, { + visitExportDefaultDeclaration: exportDeclaration, + }); + + return foundAnnotatedComponent; +}; + +module.exports = findAnnotatedComponentsResolver; +module.exports.isAnnotatedComponent = isAnnotatedComponent; diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-de.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-de.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-de.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-es.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-es.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-es.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-fr.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-fr.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-fr.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ja.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ja.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ja.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-pt.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-pt.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-pt.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ru.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ru.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-ru.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-zh.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-zh.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker-zh.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/desktop-time-picker/desktop-time-picker.json b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker.json new file mode 100644 index 00000000000000..a4a3ecea9a8a42 --- /dev/null +++ b/docs/translations/api-docs/desktop-time-picker/desktop-time-picker.json @@ -0,0 +1,46 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-de.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-de.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-de.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-es.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-es.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-es.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-fr.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-fr.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-fr.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ja.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ja.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ja.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-pt.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-pt.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-pt.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ru.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ru.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-ru.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-zh.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-zh.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker-zh.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/mobile-time-picker/mobile-time-picker.json b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker.json new file mode 100644 index 00000000000000..1b7e0ac6d120eb --- /dev/null +++ b/docs/translations/api-docs/mobile-time-picker/mobile-time-picker.json @@ -0,0 +1,51 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-de.json b/docs/translations/api-docs/static-time-picker/static-time-picker-de.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-de.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-es.json b/docs/translations/api-docs/static-time-picker/static-time-picker-es.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-es.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-fr.json b/docs/translations/api-docs/static-time-picker/static-time-picker-fr.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-fr.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-ja.json b/docs/translations/api-docs/static-time-picker/static-time-picker-ja.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-ja.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-pt.json b/docs/translations/api-docs/static-time-picker/static-time-picker-pt.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-pt.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-ru.json b/docs/translations/api-docs/static-time-picker/static-time-picker-ru.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-ru.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker-zh.json b/docs/translations/api-docs/static-time-picker/static-time-picker-zh.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker-zh.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/static-time-picker/static-time-picker.json b/docs/translations/api-docs/static-time-picker/static-time-picker.json new file mode 100644 index 00000000000000..f4a6de24783425 --- /dev/null +++ b/docs/translations/api-docs/static-time-picker/static-time-picker.json @@ -0,0 +1,45 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "className": "className applied to the root component.", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "displayStaticWrapperAs": "Force static wrapper inner components to be rendered in mobile or desktop mode", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-de.json b/docs/translations/api-docs/time-picker/time-picker-de.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-de.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-es.json b/docs/translations/api-docs/time-picker/time-picker-es.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-es.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-fr.json b/docs/translations/api-docs/time-picker/time-picker-fr.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-fr.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-ja.json b/docs/translations/api-docs/time-picker/time-picker-ja.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-ja.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-pt.json b/docs/translations/api-docs/time-picker/time-picker-pt.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-pt.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-ru.json b/docs/translations/api-docs/time-picker/time-picker-ru.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-ru.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker-zh.json b/docs/translations/api-docs/time-picker/time-picker-zh.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker-zh.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/time-picker/time-picker.json b/docs/translations/api-docs/time-picker/time-picker.json new file mode 100644 index 00000000000000..6c9b015576e14f --- /dev/null +++ b/docs/translations/api-docs/time-picker/time-picker.json @@ -0,0 +1,54 @@ +{ + "componentDescription": "", + "propDescriptions": { + "acceptRegex": "Regular expression to detect "accepted" symbols.", + "allowKeyboardControl": "Enables keyboard listener for moving between days in calendar.", + "ampm": "12h/24h view for hour selection clock.", + "ampmInClock": "Display ampm controls under the clock (instead of in the toolbar).", + "cancelText": "Cancel text message", + "className": "className applied to the root component.", + "clearable": "If true, it shows the clear action in the picker dialog.", + "clearText": "Clear text message", + "dateAdapter": "Allows to pass configured date-io adapter directly. More info here jsx dateAdapter={new AdapterDateFns({ locale: ruLocale })} ", + "desktopModeMediaQuery": "CSS media query when Mobile mode will be changed to Desktop.", + "DialogProps": "Props applied to the Dialog element.", + "disableCloseOnSelect": "If true the popup or dialog will immediately close after submitting full date.", + "disabled": "If true, the picker and text field are disabled.", + "disableIgnoringDatePartForTimeValidation": "Do not ignore date part when validating min/max time.", + "disableMaskedInput": "Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.", + "disableOpenPicker": "Do not render open picker button (renders only text field with validation).", + "getClockLabelText": "Accessible text that helps user to understand which time and view is selected.", + "getOpenDialogAriaText": "Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType", + "InputAdornmentProps": "Props to pass to keyboard input adornment.", + "inputFormat": "Format string.", + "mask": "Custom mask. Can be used to override generate from format. (e.g. //__ __: or //__ __: _M)", + "minutesStep": "Step over minutes.", + "okText": "Ok button text.", + "onAccept": "Callback fired when date is accepted @DateIOType.", + "onChange": "Callback fired when the value (the selected date) changes. @DateIOType.", + "onClose": "Callback fired when the popup requests to be closed. Use in controlled mode (see open).", + "onError": "Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. This can be used to render appropriate form error.
Read the guide about form integration and error displaying.", + "onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).", + "open": "Control the popup or dialog open state.", + "OpenPickerButtonProps": "Props to pass to keyboard adornment button.", + "openPickerIcon": "Icon displaying for open picker button.", + "openTo": "First view to show.", + "orientation": "Force rendering in particular orientation.", + "PopperProps": "Popper props passed down to Popper component.", + "readOnly": "Make picker read only.", + "renderInput": "The renderInput prop allows you to customize the rendered input. The props argument of this render prop contains props of TextField that you need to forward. Pay specific attention to the ref and inputProps keys.", + "rifmFormatter": "Custom formatter to be passed into Rifm component.", + "shouldDisableTime": "Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable.", + "showTodayButton": "If true, the today button is displayed. Note that showClearButton has a higher priority.", + "showToolbar": "If true, show the toolbar even in desktop mode.", + "todayText": "Today text message", + "ToolbarComponent": "Component that will replace default toolbar renderer.", + "toolbarFormat": "Date format, that is displaying in toolbar.", + "toolbarPlaceholder": "Mobile picker date value placeholder, displaying if value === null.", + "toolbarTitle": "Mobile picker title, displaying in the toolbar.", + "TransitionComponent": "Custom component for popper Transition.", + "value": "The value of the picker.", + "views": "Array of views to show." + }, + "classDescriptions": {} +} diff --git a/docs/types/react-docgen.d.ts b/docs/types/react-docgen.d.ts index 4dd706428828a1..dabc7ee5409dec 100644 --- a/docs/types/react-docgen.d.ts +++ b/docs/types/react-docgen.d.ts @@ -1,8 +1,40 @@ declare module 'react-docgen' { - export type Handler = () => unknown; + import { ASTNode } from 'ast-types'; + // `import { NodePath } from 'ast-types';` points to `const NodePath: NodePathConstructor` for unknown reasons. + import { NodePath as AstTypesNodePath } from 'ast-types/lib/node-path'; + + export { ASTNode }; + + // sound wrapper around `NodePath` from `ast-types` i.e. no `any` + export type NodePath = AstTypesNodePath< + Node, + Value | undefined + >; + + export interface Documentation { + toObject(): ReactDocgenApi; + } + + export type Handler = ( + documentation: Documentation, + componentDefinition: NodePath, + importer: Importer + ) => void; export const defaultHandlers: Handler[]; + export type Importer = (path: NodePath, name: string) => NodePath | undefined; + export type Resolver = ( + ast: ASTNode, + parser: unknown, + importer: Importer + ) => NodePath | NodePath[] | undefined; + + export namespace resolver { + export const findAllComponentDefinitions: Resolver; + export const findExportedComponentDefinition: Resolver; + export const findAllExportedComponentDefinitions: Resolver; + } export interface ReactDocgenApi { description: string; props: Record; @@ -105,7 +137,7 @@ declare module 'react-docgen' { export interface PropDescriptor { defaultValue?: { computed: boolean; value: string }; // augmented by docs/src/modules/utils/defaultPropsHandler.js - jsdocDefaultValue?: { computed: boolean; value: string }; + jsdocDefaultValue?: { computed?: boolean; value: string }; description?: string; // augmented by docs/src/modules/utils/defaultPropsHandler.js /** @@ -146,8 +178,16 @@ declare module 'react-docgen' { export function parse( source: string, - unknown: null, - handlers: Handler[0], + componentResolver: null | Resolver, + handlers: null | Handler[], options: { filename: string } ): any; + + export namespace utils { + export function getPropertyName(path: NodePath): string | undefined; + export function isReactForwardRefCall(path: NodePath, importer: Importer): boolean; + export function printValue(path: NodePath): string; + export function resolveExportDeclaration(path: NodePath, importer: Importer): NodePath[]; + export function resolveToValue(path: NodePath, importer: Importer): NodePath; + } } diff --git a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx index b97eb883f6ec98..366de09fba7e07 100644 --- a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx +++ b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx @@ -2,13 +2,33 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { fireEvent, screen } from 'test/utils'; +import { describeConformance, fireEvent, screen } from 'test/utils'; import { TimePickerProps } from '@material-ui/lab/TimePicker'; import DesktopTimePicker from '@material-ui/lab/DesktopTimePicker'; -import { createPickerRender, adapterToUse } from '../internal/pickers/test-utils'; +import { + createPickerMount, + createPickerRender, + adapterToUse, +} from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender({ strict: false }); + const mount = createPickerMount(); + + describeConformance( + {}} + renderInput={(props) => } + value={null} + />, + () => ({ + classes: {}, + mount, + // TODO: The `ref` on the `TimePicker` is forwarded as `inputRef` in the `renderInput` parameters. + refInstanceof: window.HTMLInputElement, + skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + }), + ); it('allows to navigate between timepicker views using arrow switcher', () => { render( diff --git a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.tsx b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.tsx index 41859a0ab64421..eb521de6957438 100644 --- a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.tsx +++ b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.tsx @@ -7,16 +7,19 @@ import { } from '../TimePicker/TimePicker'; import { DesktopWrapper } from '../internal/pickers/wrappers/Wrapper'; +// @typescript-to-proptypes-generate /** - * @ignore - do not document. + * + * API: + * + * - [DesktopTimePicker API](https://material-ui.com/api/desktop-time-picker/) */ -/* @typescript-to-proptypes-generate */ const DesktopTimePicker = makePickerWithStateAndWrapper(DesktopWrapper, { name: 'MuiDesktopTimePicker', ...timePickerConfig, }) as TimePickerGenericComponent; -(DesktopTimePicker as any).propTypes = { +DesktopTimePicker.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit TypeScript types and run "yarn proptypes" | diff --git a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx index 10a6ab0390811a..d54b441ce05402 100644 --- a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx +++ b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx @@ -2,28 +2,49 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { fireEvent, fireTouchChangedEvent } from 'test/utils'; +import { describeConformance, fireEvent, fireTouchChangedEvent } from 'test/utils'; import MobileTimePicker from '@material-ui/lab/MobileTimePicker'; -import { createPickerRender, adapterToUse, getByMuiTest } from '../internal/pickers/test-utils'; +import { + createPickerMount, + createPickerRender, + adapterToUse, + getByMuiTest, +} from '../internal/pickers/test-utils'; + +function createMouseEventWithOffsets( + type: 'mousedown' | 'mousemove' | 'mouseup', + { offsetX, offsetY, ...eventOptions }: { offsetX: number; offsetY: number } & MouseEventInit, +) { + const event = new window.MouseEvent(type, { + bubbles: true, + cancelable: true, + ...eventOptions, + }); -describe('', () => { - const render = createPickerRender({ strict: false }); + Object.defineProperty(event, 'offsetX', { get: () => offsetX }); + Object.defineProperty(event, 'offsetY', { get: () => offsetY }); - function createMouseEventWithOffsets( - type: 'mousedown' | 'mousemove' | 'mouseup', - { offsetX, offsetY, ...eventOptions }: { offsetX: number; offsetY: number } & MouseEventInit, - ) { - const event = new window.MouseEvent(type, { - bubbles: true, - cancelable: true, - ...eventOptions, - }); + return event; +} - Object.defineProperty(event, 'offsetX', { get: () => offsetX }); - Object.defineProperty(event, 'offsetY', { get: () => offsetY }); - - return event; - } +describe('', () => { + const render = createPickerRender({ strict: false }); + const mount = createPickerMount(); + + describeConformance( + {}} + renderInput={(props) => } + value={null} + />, + () => ({ + classes: {}, + mount, + // TODO: The `ref` on the `TimePicker` is forwarded as `inputRef` in the `renderInput` parameters. + refInstanceof: window.HTMLInputElement, + skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + }), + ); it('accepts time on clock mouse move', () => { const onChangeMock = spy(); diff --git a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.tsx b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.tsx index 9aca8027626034..e20ea880d6c730 100644 --- a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.tsx +++ b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.tsx @@ -7,16 +7,19 @@ import { } from '../TimePicker/TimePicker'; import { MobileWrapper } from '../internal/pickers/wrappers/Wrapper'; +// @typescript-to-proptypes-generate /** - * @ignore - do not document. + * + * API: + * + * - [MobileTimePicker API](https://material-ui.com/api/mobile-time-picker/) */ -/* @typescript-to-proptypes-generate */ const MobileTimePicker = makePickerWithStateAndWrapper(MobileWrapper, { name: 'MuiMobileTimePicker', ...timePickerConfig, }) as TimePickerGenericComponent; -(MobileTimePicker as any).propTypes = { +MobileTimePicker.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit TypeScript types and run "yarn proptypes" | diff --git a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx new file mode 100644 index 00000000000000..9c5cab487f6b28 --- /dev/null +++ b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx @@ -0,0 +1,31 @@ +import * as React from 'react'; +import TextField from '@material-ui/core/TextField'; +import { describeConformance } from 'test/utils'; +import StaticTimePicker from './StaticTimePicker'; +import { createPickerMount } from '../internal/pickers/test-utils'; + +describe('', () => { + const mount = createPickerMount(); + + describeConformance( + {}} + renderInput={(props) => } + value={null} + />, + () => ({ + classes: {}, + mount, + refInstanceof: undefined, + skip: [ + 'componentProp', + 'mergeClassName', + 'propsSpread', + // TODO: `ref` is typed but has no effect + 'refForwarding', + 'rootClass', + 'reactTestRenderer', + ], + }), + ); +}); diff --git a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.tsx b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.tsx index 205485283214ba..fcb53dfcb90c91 100644 --- a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.tsx +++ b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.tsx @@ -7,16 +7,19 @@ import { } from '../TimePicker/TimePicker'; import { StaticWrapper } from '../internal/pickers/wrappers/Wrapper'; +// @typescript-to-proptypes-generate /** - * @ignore - do not document. + * + * API: + * + * - [StaticTimePicker API](https://material-ui.com/api/static-time-picker/) */ -/* @typescript-to-proptypes-generate */ const StaticTimePicker = makePickerWithStateAndWrapper(StaticWrapper, { name: 'MuiStaticTimePicker', ...timePickerConfig, }) as TimePickerGenericComponent; -(StaticTimePicker as any).propTypes = { +StaticTimePicker.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit TypeScript types and run "yarn proptypes" | diff --git a/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx new file mode 100644 index 00000000000000..29fa9cc8b571f9 --- /dev/null +++ b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx @@ -0,0 +1,24 @@ +import * as React from 'react'; +import TextField from '@material-ui/core/TextField'; +import { describeConformance } from 'test/utils'; +import TimePicker from './TimePicker'; +import { createPickerMount } from '../internal/pickers/test-utils'; + +describe('', () => { + const mount = createPickerMount(); + + describeConformance( + {}} + renderInput={(props) => } + value={null} + />, + () => ({ + classes: {}, + mount, + // TODO: The `ref` on the `TimePicker` is forwarded as `inputRef` in the `renderInput` parameters. + refInstanceof: window.HTMLInputElement, + skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + }), + ); +}); diff --git a/packages/material-ui-lab/src/TimePicker/TimePicker.tsx b/packages/material-ui-lab/src/TimePicker/TimePicker.tsx index b3073cf6a22247..dda8f520c90dd0 100644 --- a/packages/material-ui-lab/src/TimePicker/TimePicker.tsx +++ b/packages/material-ui-lab/src/TimePicker/TimePicker.tsx @@ -74,20 +74,27 @@ export const timePickerConfig = { DefaultToolbarComponent: TimePickerToolbar, }; -export type TimePickerGenericComponent = ( +export type TimePickerGenericComponent = (( props: BaseTimePickerProps & SharedPickerProps, -) => JSX.Element; +) => JSX.Element) & { propTypes?: unknown }; /** - * @ignore - do not document. + * + * Demos: + * + * - [Time Picker](https://material-ui.com/components/time-picker/) + * + * API: + * + * - [TimePicker API](https://material-ui.com/api/time-picker/) */ -/* @typescript-to-proptypes-generate */ +// @typescript-to-proptypes-generate const TimePicker = makePickerWithStateAndWrapper(ResponsiveWrapper, { name: 'MuiTimePicker', ...timePickerConfig, }) as TimePickerGenericComponent; -(TimePicker as any).propTypes = { +TimePicker.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit TypeScript types and run "yarn proptypes" | diff --git a/packages/material-ui-lab/src/internal/pickers/test-utils.tsx b/packages/material-ui-lab/src/internal/pickers/test-utils.tsx index 885269738887ef..2c108eccd2bd28 100644 --- a/packages/material-ui-lab/src/internal/pickers/test-utils.tsx +++ b/packages/material-ui-lab/src/internal/pickers/test-utils.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { parseISO } from 'date-fns'; -import { createClientRender, fireEvent, screen } from 'test/utils'; +import { createClientRender, createMount, fireEvent, screen } from 'test/utils'; import { queryHelpers, Matcher, MatcherOptions } from '@testing-library/react/pure'; import { TransitionProps } from '@material-ui/core/transitions'; import AdapterDateFns from '@material-ui/lab/AdapterDateFns'; @@ -38,6 +38,13 @@ interface PickerRenderOptions { locale?: string | object; } +export function createPickerMount(options: { strict?: boolean } = {}) { + const mount = createMount(options); + + return (node: React.ReactNode) => + mount({node}); +} + export function createPickerRender({ locale, ...renderOptions diff --git a/packages/typescript-to-proptypes/src/injector.ts b/packages/typescript-to-proptypes/src/injector.ts index 258b62e97f985d..27b255c44c8dea 100644 --- a/packages/typescript-to-proptypes/src/injector.ts +++ b/packages/typescript-to-proptypes/src/injector.ts @@ -314,7 +314,7 @@ function plugin( if (!babelTypes.isIdentifier(node.declarations[0].id)) return; const nodeName = node.declarations[0].id.name; - // Handle any variable with /* @typescript-to-proptypes-generate */ + // Handle any variable with a comment containing `@typescript-to-proptypes-generate` if ( node.leadingComments && node.leadingComments.some((comment) => diff --git a/scripts/generateProptypes.ts b/scripts/generateProptypes.ts index 8b5749f50504b8..e0d4bdb6d79a4e 100644 --- a/scripts/generateProptypes.ts +++ b/scripts/generateProptypes.ts @@ -37,18 +37,14 @@ const todoComponentsTs: string[] = [ 'MobileDateRangePicker', 'DateTimePicker', 'DesktopDateTimePicker', - 'DesktopTimePicker', 'LocalizationProvider', 'MobileDatePicker', 'MobileDateTimePicker', - 'MobileTimePicker', 'MonthPicker', 'PickersCalendarSkeleton', 'PickersDay', 'StaticDatePicker', 'StaticDateTimePicker', - 'StaticTimePicker', - 'TimePicker', 'YearPicker', ]; diff --git a/test/utils/describeConformance.js b/test/utils/describeConformance.js index 51ee30b29c0987..956363ee29b957 100644 --- a/test/utils/describeConformance.js +++ b/test/utils/describeConformance.js @@ -91,7 +91,7 @@ export function testComponentProp(element, getOptions) { /** * Material-UI components can spread additional props to a documented component. - * It's set via @inheritComponent in the source. + * * @param {React.ReactElement} element * @param {() => ConformanceOptions} getOptions */ @@ -126,7 +126,7 @@ export function describeRef(element, getOptions) { testRef(element, mount, (instance, wrapper) => { expect(instance).to.be.instanceof(refInstanceof); - if (inheritComponent && instance.nodeType === 1) { + if (inheritComponent !== undefined && instance.nodeType === 1) { const rootHost = findOutermostIntrinsic(wrapper); expect(instance).to.equal(rootHost.instance()); } @@ -196,7 +196,7 @@ const fullSuite = { /** * @typedef {Object} ConformanceOptions * @property {Record} classes - `classes` of the component provided by `@material-ui/styles` - * @property {import('react').ElementType} inheritComponent - The element type that receives spread props. + * @property {import('react').ElementType} [inheritComponent] - The element type that receives spread props or `undefined` if props are not spread. * @property {(node: React.ReactNode) => void} mount - Should be a return value from createMount * @property {Array} [only] - If specified only run the tests listed * @property {any} refInstanceof - `ref` will be an instanceof this constructor.