-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TreeView] Create the package on the X repository (#9798)
- Loading branch information
1 parent
d1ac291
commit 24ddead
Showing
40 changed files
with
5,559 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { MuiPage } from '@mui/monorepo/docs/src/MuiPage'; | ||
|
||
export default [ | ||
{ pathname: '/x/api/tree-view/tree-item', title: 'TreeItem' }, | ||
{ pathname: '/x/api/tree-view/tree-view', title: 'TreeView' }, | ||
] as MuiPage[]; |
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 './tree-item-content.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/tree-view', | ||
false, | ||
/\.\/tree-item-content(-[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,26 @@ | ||
{ | ||
"props": { | ||
"classes": { "type": { "name": "object" }, "required": true }, | ||
"nodeId": { "type": { "name": "string" }, "required": true }, | ||
"className": { "type": { "name": "string" } }, | ||
"displayIcon": { "type": { "name": "node" } }, | ||
"expansionIcon": { "type": { "name": "node" } }, | ||
"icon": { "type": { "name": "node" } }, | ||
"label": { "type": { "name": "node" } } | ||
}, | ||
"slots": {}, | ||
"name": "TreeItemContent", | ||
"styles": { | ||
"classes": ["root", "expanded", "selected", "focused", "disabled", "iconContainer", "label"], | ||
"globalClasses": { | ||
"expanded": "Mui-expanded", | ||
"selected": "Mui-selected", | ||
"focused": "Mui-focused", | ||
"disabled": "Mui-disabled" | ||
}, | ||
"name": "MuiTreeItemContent" | ||
}, | ||
"filename": "/packages/x-tree-view/src/TreeItem/TreeItemContent.tsx", | ||
"demos": "<ul></ul>", | ||
"packages": [{ "packageName": "@mui/x-tree-view", "componentName": "TreeItemContent" }] | ||
} |
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 './tree-item.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/tree-view', | ||
false, | ||
/\.\/tree-item(-[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,55 @@ | ||
{ | ||
"props": { | ||
"nodeId": { "type": { "name": "string" }, "required": true }, | ||
"children": { "type": { "name": "node" } }, | ||
"classes": { "type": { "name": "object" } }, | ||
"collapseIcon": { "type": { "name": "node" } }, | ||
"ContentComponent": { | ||
"type": { "name": "custom", "description": "element type" }, | ||
"default": "TreeItemContent" | ||
}, | ||
"ContentProps": { "type": { "name": "object" } }, | ||
"disabled": { "type": { "name": "bool" } }, | ||
"endIcon": { "type": { "name": "node" } }, | ||
"expandIcon": { "type": { "name": "node" } }, | ||
"icon": { "type": { "name": "node" } }, | ||
"label": { "type": { "name": "node" } }, | ||
"onFocus": { "type": { "name": "custom", "description": "unsupportedProp" } }, | ||
"sx": { | ||
"type": { | ||
"name": "union", | ||
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object" | ||
} | ||
}, | ||
"TransitionComponent": { "type": { "name": "elementType" }, "default": "Collapse" }, | ||
"TransitionProps": { "type": { "name": "object" } } | ||
}, | ||
"slots": {}, | ||
"name": "TreeItem", | ||
"styles": { | ||
"classes": [ | ||
"root", | ||
"group", | ||
"content", | ||
"expanded", | ||
"selected", | ||
"focused", | ||
"disabled", | ||
"iconContainer", | ||
"label" | ||
], | ||
"globalClasses": { | ||
"expanded": "Mui-expanded", | ||
"selected": "Mui-selected", | ||
"focused": "Mui-focused", | ||
"disabled": "Mui-disabled" | ||
}, | ||
"name": "MuiTreeItem" | ||
}, | ||
"spread": true, | ||
"forwardsRefTo": "HTMLLIElement", | ||
"filename": "/packages/x-tree-view/src/TreeItem/TreeItem.tsx", | ||
"inheritance": null, | ||
"demos": "<ul></ul>", | ||
"packages": [{ "packageName": "@mui/x-tree-view", "componentName": "TreeItem" }] | ||
} |
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 './tree-view.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/tree-view', | ||
false, | ||
/\.\/tree-view(-[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,44 @@ | ||
{ | ||
"props": { | ||
"children": { "type": { "name": "node" } }, | ||
"classes": { "type": { "name": "object" } }, | ||
"defaultCollapseIcon": { "type": { "name": "node" } }, | ||
"defaultEndIcon": { "type": { "name": "node" } }, | ||
"defaultExpanded": { | ||
"type": { "name": "arrayOf", "description": "Array<string>" }, | ||
"default": "[]" | ||
}, | ||
"defaultExpandIcon": { "type": { "name": "node" } }, | ||
"defaultParentIcon": { "type": { "name": "node" } }, | ||
"defaultSelected": { | ||
"type": { "name": "union", "description": "Array<string><br>| string" }, | ||
"default": "[]" | ||
}, | ||
"disabledItemsFocusable": { "type": { "name": "bool" } }, | ||
"disableSelection": { "type": { "name": "bool" } }, | ||
"expanded": { "type": { "name": "arrayOf", "description": "Array<string>" } }, | ||
"id": { "type": { "name": "string" } }, | ||
"multiSelect": { "type": { "name": "bool" } }, | ||
"onNodeFocus": { "type": { "name": "func" } }, | ||
"onNodeSelect": { "type": { "name": "func" } }, | ||
"onNodeToggle": { "type": { "name": "func" } }, | ||
"selected": { | ||
"type": { "name": "union", "description": "Array<string><br>| string" } | ||
}, | ||
"sx": { | ||
"type": { | ||
"name": "union", | ||
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object" | ||
} | ||
} | ||
}, | ||
"slots": {}, | ||
"name": "TreeView", | ||
"styles": { "classes": ["root"], "globalClasses": {}, "name": "MuiTreeView" }, | ||
"spread": true, | ||
"forwardsRefTo": "HTMLUListElement", | ||
"filename": "/packages/x-tree-view/src/TreeView/TreeView.tsx", | ||
"inheritance": null, | ||
"demos": "<ul></ul>", | ||
"packages": [{ "packageName": "@mui/x-tree-view", "componentName": "TreeView" }] | ||
} |
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
41 changes: 41 additions & 0 deletions
41
docs/translations/api-docs/tree-view/tree-item-content.json
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,41 @@ | ||
{ | ||
"componentDescription": "@ignore - internal component.", | ||
"propDescriptions": { | ||
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.", | ||
"className": "className applied to the root element.", | ||
"displayIcon": "The icon to display next to the tree node's label. Either a parent or end icon.", | ||
"expansionIcon": "The icon to display next to the tree node's label. Either an expansion or collapse icon.", | ||
"icon": "The icon to display next to the tree node's label.", | ||
"label": "The tree node label.", | ||
"nodeId": "The id of the node." | ||
}, | ||
"classDescriptions": { | ||
"root": { "description": "Styles applied to the root element." }, | ||
"expanded": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "expanded" | ||
}, | ||
"selected": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "selected" | ||
}, | ||
"focused": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "focused" | ||
}, | ||
"disabled": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the element", | ||
"conditions": "disabled" | ||
}, | ||
"iconContainer": { | ||
"description": "Styles applied to {{nodeName}}.", | ||
"nodeName": "the tree node icon and collapse/expand icon" | ||
}, | ||
"label": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the label element" } | ||
}, | ||
"slotDescriptions": {} | ||
} |
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,57 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"children": "The content of the component.", | ||
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.", | ||
"collapseIcon": "The icon used to collapse the node.", | ||
"ContentComponent": "The component used for the content node.<br>⚠️ <a href=\"/material-ui/guides/composition/#caveat-with-refs\">Needs to be able to hold a ref</a>.", | ||
"ContentProps": "Props applied to ContentComponent", | ||
"disabled": "If <code>true</code>, the node is disabled.", | ||
"endIcon": "The icon displayed next to a end node.", | ||
"expandIcon": "The icon used to expand the node.", | ||
"icon": "The icon to display next to the tree node's label.", | ||
"label": "The tree node label.", | ||
"nodeId": "The id of the node.", | ||
"onFocus": "This prop isn't supported. Use the <code>onNodeFocus</code> callback on the tree if you need to monitor a node's focus.", | ||
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/getting-started/the-sx-prop/\">`sx` page</a> for more details.", | ||
"TransitionComponent": "The component used for the transition. <a href=\"/material-ui/transitions/#transitioncomponent-prop\">Follow this guide</a> to learn more about the requirements for this component.", | ||
"TransitionProps": "Props applied to the transition element. By default, the element is based on this <a href=\"http:https://reactcommunity.org/react-transition-group/transition/\"><code>Transition</code></a> component." | ||
}, | ||
"classDescriptions": { | ||
"root": { "description": "Styles applied to the root element." }, | ||
"group": { | ||
"description": "Styles applied to {{nodeName}}.", | ||
"nodeName": "the transition component" | ||
}, | ||
"content": { | ||
"description": "Styles applied to {{nodeName}}.", | ||
"nodeName": "the content element" | ||
}, | ||
"expanded": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "expanded" | ||
}, | ||
"selected": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "selected" | ||
}, | ||
"focused": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the content element", | ||
"conditions": "focused" | ||
}, | ||
"disabled": { | ||
"description": "State class applied to {{nodeName}} when {{conditions}}.", | ||
"nodeName": "the element", | ||
"conditions": "disabled" | ||
}, | ||
"iconContainer": { | ||
"description": "Styles applied to {{nodeName}}.", | ||
"nodeName": "the tree node icon" | ||
}, | ||
"label": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the label element" } | ||
}, | ||
"slotDescriptions": {} | ||
} |
Oops, something went wrong.