-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add support for API pages of unstable components (#6981)
- Loading branch information
1 parent
043522f
commit 522b138
Showing
152 changed files
with
6,428 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from 'react'; | ||
import ApiPage from 'docsx/src/modules/components/ApiPage'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './date-field.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/date-pickers', | ||
false, | ||
/\/date-field(-[a-z]{2})?\.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"props": { | ||
"components": { "type": { "name": "object" }, "default": "{}" }, | ||
"componentsProps": { "type": { "name": "object" }, "default": "{}" }, | ||
"defaultValue": { "type": { "name": "any" } }, | ||
"disableFuture": { "type": { "name": "bool" } }, | ||
"disablePast": { "type": { "name": "bool" } }, | ||
"format": { "type": { "name": "string" } }, | ||
"maxDate": { "type": { "name": "any" } }, | ||
"minDate": { "type": { "name": "any" } }, | ||
"onChange": { "type": { "name": "func" } }, | ||
"onError": { "type": { "name": "func" } }, | ||
"onSelectedSectionsChange": { "type": { "name": "func" } }, | ||
"readOnly": { "type": { "name": "bool" } }, | ||
"selectedSections": { | ||
"type": { | ||
"name": "union", | ||
"description": "'day'<br>| 'hours'<br>| 'meridiem'<br>| 'minutes'<br>| 'month'<br>| 'seconds'<br>| 'year'<br>| number<br>| { endIndex: number, startIndex: number }" | ||
} | ||
}, | ||
"shouldDisableDate": { "type": { "name": "func" } }, | ||
"shouldDisableMonth": { "type": { "name": "func" } }, | ||
"shouldDisableYear": { "type": { "name": "func" } }, | ||
"value": { "type": { "name": "any" } } | ||
}, | ||
"slots": { "Input": { "default": "TextField", "type": { "name": "elementType" } } }, | ||
"name": "DateField", | ||
"styles": { "classes": [], "globalClasses": {}, "name": "MuiDateField" }, | ||
"filename": "/packages/x-date-pickers/src/DateField/DateField.tsx", | ||
"demos": "<ul></ul>", | ||
"packages": [ | ||
{ "packageName": "@mui/x-date-pickers-pro", "componentName": "Unstable_DateField" }, | ||
{ "packageName": "@mui/x-date-pickers", "componentName": "Unstable_DateField" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from 'react'; | ||
import ApiPage from 'docsx/src/modules/components/ApiPage'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './date-time-field.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/date-pickers', | ||
false, | ||
/\/date-time-field(-[a-z]{2})?\.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"props": { | ||
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" }, | ||
"components": { "type": { "name": "object" }, "default": "{}" }, | ||
"componentsProps": { "type": { "name": "object" }, "default": "{}" }, | ||
"defaultValue": { "type": { "name": "any" } }, | ||
"disableFuture": { "type": { "name": "bool" } }, | ||
"disableIgnoringDatePartForTimeValidation": { "type": { "name": "bool" } }, | ||
"disablePast": { "type": { "name": "bool" } }, | ||
"format": { "type": { "name": "string" } }, | ||
"maxDate": { "type": { "name": "any" } }, | ||
"maxDateTime": { "type": { "name": "any" } }, | ||
"maxTime": { "type": { "name": "any" } }, | ||
"minDate": { "type": { "name": "any" } }, | ||
"minDateTime": { "type": { "name": "any" } }, | ||
"minTime": { "type": { "name": "any" } }, | ||
"minutesStep": { "type": { "name": "number" }, "default": "1" }, | ||
"onChange": { "type": { "name": "func" } }, | ||
"onError": { "type": { "name": "func" } }, | ||
"onSelectedSectionsChange": { "type": { "name": "func" } }, | ||
"readOnly": { "type": { "name": "bool" } }, | ||
"selectedSections": { | ||
"type": { | ||
"name": "union", | ||
"description": "'day'<br>| 'hours'<br>| 'meridiem'<br>| 'minutes'<br>| 'month'<br>| 'seconds'<br>| 'year'<br>| number<br>| { endIndex: number, startIndex: number }" | ||
} | ||
}, | ||
"shouldDisableDate": { "type": { "name": "func" } }, | ||
"shouldDisableMonth": { "type": { "name": "func" } }, | ||
"shouldDisableTime": { "type": { "name": "func" } }, | ||
"shouldDisableYear": { "type": { "name": "func" } }, | ||
"value": { "type": { "name": "any" } } | ||
}, | ||
"slots": { "Input": { "default": "TextField", "type": { "name": "elementType" } } }, | ||
"name": "DateTimeField", | ||
"styles": { "classes": [], "globalClasses": {}, "name": "MuiDateTimeField" }, | ||
"filename": "/packages/x-date-pickers/src/DateTimeField/DateTimeField.tsx", | ||
"demos": "<ul></ul>", | ||
"packages": [ | ||
{ "packageName": "@mui/x-date-pickers-pro", "componentName": "Unstable_DateTimeField" }, | ||
{ "packageName": "@mui/x-date-pickers", "componentName": "Unstable_DateTimeField" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from 'react'; | ||
import ApiPage from 'docsx/src/modules/components/ApiPage'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './desktop-next-date-picker.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context( | ||
'docsx/translations/api-docs/date-pickers', | ||
false, | ||
/\/desktop-next-date-picker(-[a-z]{2})?\.json$/, | ||
); | ||
const descriptions = mapApiPageTranslations(req); | ||
|
||
return { | ||
descriptions, | ||
pageContent: jsonPageContent, | ||
}; | ||
}; |
Oops, something went wrong.