Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[docs-infra] New API reference generator #1537

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/generated/accordion-header.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A heading that labels the corresponding panel.\nRenders an `<h3>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
9 changes: 6 additions & 3 deletions docs/reference/generated/accordion-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "AccordionItem",
"description": "Groups an accordion header with the corresponding panel.\nRenders a `<div>` element.",
"props": {
"value": {
"type": "any"
},
"onOpenChange": {
"type": "(open) => void",
"type": "((open: boolean) => void)",
"description": "Event handler called when the panel is opened or closed."
},
"disabled": {
Expand All @@ -12,11 +15,11 @@
"description": "Whether the component should ignore user interaction."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/accordion-panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "Allows the browser’s built-in page search to find and expand the panel contents.\n\nOverrides the `keepMounted` prop and uses `hidden=\"until-found\"`\nto hide the element without removing it from the DOM."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"keepMounted": {
Expand All @@ -17,7 +17,7 @@
"description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/generated/accordion-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"description": "Groups all parts of the accordion.\nRenders a `<div>` element.",
"props": {
"defaultValue": {
"type": "array",
"type": "\"D:/Development/MUI/base-ui/packages/react/src/accordion/root/useAccordionRoot\".AccordionValue",
"description": "The uncontrolled value of the item(s) that should be initially expanded.\n\nTo render a controlled accordion, use the `value` prop instead."
},
"value": {
"type": "array",
"type": "\"D:/Development/MUI/base-ui/packages/react/src/accordion/root/useAccordionRoot\".AccordionValue",
"description": "The controlled value of the item(s) that should be expanded.\n\nTo render an uncontrolled accordion, use the `defaultValue` prop instead."
},
"onValueChange": {
"type": "(value) => void",
"type": "((value: \"D:/Development/MUI/base-ui/packages/react/src/accordion/root/useAccordionRoot\".AccordionValue) => void)",
"description": "Event handler called when an accordion item is expanded or collapsed.\nProvides the new value as an argument."
},
"hiddenUntilFound": {
Expand All @@ -35,12 +35,12 @@
"description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."
},
"orientation": {
"type": "'horizontal' | 'vertical'",
"type": "\"horizontal\" | \"vertical\"",
"default": "'vertical'",
"description": "The visual orientation of the accordion.\nControls whether roving focus uses left/right or up/down arrow keys."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"keepMounted": {
Expand All @@ -49,7 +49,7 @@
"description": "Whether to keep the element in the DOM while the panel is closed.\nThis prop is ignored when `hiddenUntilFound` is used."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/accordion-trigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A button that opens and closes the corresponding panel.\nRenders a `<button>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/alert-dialog-backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "An overlay displayed beneath the popup.\nRenders a `<div>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/alert-dialog-close.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A button that closes the alert dialog.\nRenders a `<button>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/alert-dialog-description.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A paragraph with additional information about the alert dialog.\nRenders a `<p>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: unknown) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: unknown) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/generated/alert-dialog-popup.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"description": "A container for the alert dialog contents.\nRenders a `<div>` element.",
"props": {
"initialFocus": {
"type": "React.Ref | (interactionType => HTMLElement | null)",
"type": "React.RefObject | ((interactionType: \"\" | \"mouse\" | \"pen\" | \"touch\" | \"keyboard\") => React.RefObject)",
"description": "Determines the element to focus when the dialog is opened.\nBy default, the first focusable element is focused."
},
"finalFocus": {
"type": "React.Ref",
"type": "React.RefObject",
"description": "Determines the element to focus when the dialog is closed.\nBy default, focus returns to the trigger."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/generated/alert-dialog-portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"description": "A portal element that moves the popup to a different part of the DOM.\nBy default, the portal element is appended to `<body>`.",
"props": {
"container": {
"type": "React.Ref | HTMLElement | null",
"type": "null | HTMLElement | React.RefObject",
"description": "A parent element to render the portal element into."
},
"children": {
"type": "React.ReactNode",
"required": true
},
"keepMounted": {
"type": "boolean",
"default": "false",
Expand Down
10 changes: 7 additions & 3 deletions docs/reference/generated/alert-dialog-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
"description": "Whether the dialog is currently open."
},
"onOpenChange": {
"type": "(open, event, reason) => void",
"type": "function",
"description": "Event handler called when the dialog is opened or closed."
},
"actionsRef": {
"type": "{ current: { unmount: func } }",
"type": "React.RefObject",
"description": "A ref to imperative actions."
},
"onOpenChangeComplete": {
"type": "(open) => void",
"type": "function",
"description": "Event handler called after any animations complete when the dialog is opened or closed."
},
"children": {
"type": "React.ReactNode",
"required": true
}
},
"dataAttributes": {},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/alert-dialog-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A heading that labels the dialog.\nRenders an `<h2>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: unknown) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: unknown) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/alert-dialog-trigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A button that opens the alert dialog.\nRenders a `<button>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/avatar-fallback.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"description": "How long to wait before showing the fallback. Specified in milliseconds."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/generated/avatar-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"description": "The image to be displayed in the avatar.\nRenders an `<img>` element.",
"props": {
"onLoadingStatusChange": {
"type": "(status) => void",
"type": "((status: \"idle\" | \"loading\" | \"loaded\" | \"error\") => void)",
"description": "Callback fired when the loading status changes."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/avatar-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "Displays a user's profile picture, initials, or fallback icon.\nRenders a `<span>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/generated/checkbox-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"description": "Provides a shared state to a series of checkboxes.",
"props": {
"defaultValue": {
"type": "string[]",
"type": "Array",
"description": "Names of the checkboxes in the group that should be initially ticked.\n\nTo render a controlled checkbox group, use the `value` prop instead."
},
"value": {
"type": "string[]",
"type": "Array",
"description": "Names of the checkboxes in the group that should be ticked.\n\nTo render an uncontrolled checkbox group, use the `defaultValue` prop instead."
},
"onValueChange": {
"type": "(value, event) => void",
"type": "((value: Array, event: Event) => void)",
"description": "Event handler called when a checkbox in the group is ticked or unticked.\nProvides the new value as an argument."
},
"allValues": {
"type": "string[]",
"type": "Array",
"description": "Names of all checkboxes in the group. Use this when creating a parent checkbox."
},
"disabled": {
Expand All @@ -24,11 +24,11 @@
"description": "Whether the component should ignore user interaction."
},
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/generated/checkbox-indicator.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Indicates whether the checkbox is ticked.\nRenders a `<span>` element.",
"props": {
"className": {
"type": "string | (state) => string",
"type": "string | ((state: State) => string)",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
},
"keepMounted": {
Expand All @@ -12,7 +12,7 @@
"description": "Whether to keep the element in the DOM when the checkbox is not checked."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"type": "React.ReactElement | ((props: GenericHTMLProps, state: State) => React.ReactElement)",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
}
},
Expand Down
Loading