-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dc7154
commit 3d89466
Showing
9 changed files
with
306 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import ApiPage from 'docs/src/modules/components/ApiPage'; | ||
import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; | ||
import jsonPageContent from './snackbar.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const req = require.context('docs/translations/api-docs-joy/snackbar', false, /snackbar.*.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,120 @@ | ||
{ | ||
"props": { | ||
"anchorOrigin": { | ||
"type": { | ||
"name": "shape", | ||
"description": "{ horizontal: 'center'<br>| 'left'<br>| 'right', vertical: 'bottom'<br>| 'top' }" | ||
}, | ||
"default": "{ vertical: 'bottom', horizontal: 'left' }" | ||
}, | ||
"autoHideDuration": { "type": { "name": "number" }, "default": "null" }, | ||
"ClickAwayListenerProps": { "type": { "name": "object" } }, | ||
"color": { | ||
"type": { | ||
"name": "enum", | ||
"description": "'danger'<br>| 'neutral'<br>| 'primary'<br>| 'success'<br>| 'warning'" | ||
}, | ||
"default": "'neutral'", | ||
"additionalInfo": { "joy-color": true } | ||
}, | ||
"component": { "type": { "name": "elementType" } }, | ||
"disableWindowBlurListener": { "type": { "name": "bool" }, "default": "false" }, | ||
"onClose": { | ||
"type": { "name": "func" }, | ||
"signature": { | ||
"type": "function(event: React.SyntheticEvent<any> | Event, reason: string) => void", | ||
"describedArgs": ["event", "reason"] | ||
} | ||
}, | ||
"open": { "type": { "name": "bool" } }, | ||
"resumeHideDuration": { "type": { "name": "number" } }, | ||
"size": { | ||
"type": { "name": "enum", "description": "'sm'<br>| 'md'<br>| 'lg'" }, | ||
"default": "'md'", | ||
"additionalInfo": { "joy-size": true } | ||
}, | ||
"slotProps": { | ||
"type": { | ||
"name": "shape", | ||
"description": "{ endDecorator?: func<br>| object, root?: func<br>| object, startDecorator?: func<br>| object }" | ||
}, | ||
"default": "{}" | ||
}, | ||
"slots": { | ||
"type": { | ||
"name": "shape", | ||
"description": "{ endDecorator?: elementType, root?: elementType, startDecorator?: elementType }" | ||
}, | ||
"default": "{}", | ||
"additionalInfo": { "slotsApi": true } | ||
}, | ||
"sx": { | ||
"type": { | ||
"name": "union", | ||
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object" | ||
}, | ||
"additionalInfo": { "sx": true } | ||
}, | ||
"variant": { | ||
"type": { | ||
"name": "enum", | ||
"description": "'outlined'<br>| 'plain'<br>| 'soft'<br>| 'solid'" | ||
}, | ||
"default": "'outlined'", | ||
"additionalInfo": { "joy-variant": true } | ||
} | ||
}, | ||
"name": "Snackbar", | ||
"imports": ["import Snackbar from '@mui/joy/Snackbar';", "import { Snackbar } from '@mui/joy';"], | ||
"styles": { "classes": [], "globalClasses": {}, "name": "MuiSnackbar" }, | ||
"slots": [ | ||
{ | ||
"name": "root", | ||
"description": "The component that renders the root.", | ||
"default": "'div'", | ||
"class": ".MuiSnackbar-root" | ||
}, | ||
{ | ||
"name": "startDecorator", | ||
"description": "The component that renders the start decorator.", | ||
"default": "'span'", | ||
"class": ".MuiSnackbar-startDecorator" | ||
}, | ||
{ | ||
"name": "endDecorator", | ||
"description": "The component that renders the end decorator.", | ||
"default": "'span'", | ||
"class": ".MuiSnackbar-endDecorator" | ||
} | ||
], | ||
"classes": { | ||
"classes": [ | ||
"anchorOriginBottomCenter", | ||
"anchorOriginBottomLeft", | ||
"anchorOriginBottomRight", | ||
"anchorOriginTopCenter", | ||
"anchorOriginTopLeft", | ||
"anchorOriginTopRight", | ||
"colorDanger", | ||
"colorNeutral", | ||
"colorPrimary", | ||
"colorSuccess", | ||
"colorWarning", | ||
"sizeLg", | ||
"sizeMd", | ||
"sizeSm", | ||
"variantOutlined", | ||
"variantPlain", | ||
"variantSoft", | ||
"variantSolid" | ||
], | ||
"globalClasses": {} | ||
}, | ||
"spread": true, | ||
"themeDefaultProps": null, | ||
"muiName": "JoySnackbar", | ||
"filename": "/packages/mui-joy/src/Snackbar/Snackbar.tsx", | ||
"inheritance": null, | ||
"demos": "<ul><li><a href=\"/joy-ui/react-snackbar/\">Snackbar</a></li></ul>", | ||
"cssComponent": false | ||
} |
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,151 @@ | ||
{ | ||
"componentDescription": "", | ||
"propDescriptions": { | ||
"anchorOrigin": { | ||
"description": "The anchor of the <code>Snackbar</code>. On smaller screens, the component grows to occupy all the available width, the horizontal alignment is ignored." | ||
}, | ||
"autoHideDuration": { | ||
"description": "The number of milliseconds to wait before automatically calling the <code>onClose</code> function. <code>onClose</code> should then set the state of the <code>open</code> prop to hide the Snackbar. This behavior is disabled by default with the <code>null</code> value." | ||
}, | ||
"ClickAwayListenerProps": { | ||
"description": "Props applied to the <code>ClickAwayListener</code> element." | ||
}, | ||
"color": { | ||
"description": "The color of the component. It supports those theme colors that make sense for this component." | ||
}, | ||
"component": { | ||
"description": "The component used for the root node. Either a string to use a HTML element or a component." | ||
}, | ||
"disableWindowBlurListener": { | ||
"description": "If <code>true</code>, the <code>autoHideDuration</code> timer will expire even if the window is not focused." | ||
}, | ||
"onClose": { | ||
"description": "Callback fired when the component requests to be closed. Typically <code>onClose</code> is used to set state in the parent component, which is used to control the <code>Snackbar</code> <code>open</code> prop. The <code>reason</code> parameter can optionally be used to control the response to <code>onClose</code>, for example ignoring <code>clickaway</code>.", | ||
"typeDescriptions": { | ||
"event": "The event source of the callback.", | ||
"reason": "Can be: <code>"timeout"</code> (<code>autoHideDuration</code> expired), <code>"clickaway"</code>, or <code>"escapeKeyDown"</code>." | ||
} | ||
}, | ||
"open": { "description": "If <code>true</code>, the component is shown." }, | ||
"resumeHideDuration": { | ||
"description": "The number of milliseconds to wait before dismissing after user interaction. If <code>autoHideDuration</code> prop isn't specified, it does nothing. If <code>autoHideDuration</code> prop is specified but <code>resumeHideDuration</code> isn't, we default to <code>autoHideDuration / 2</code> ms." | ||
}, | ||
"size": { "description": "The size of the component." }, | ||
"slotProps": { "description": "The props used for each slot inside." }, | ||
"slots": { "description": "The components used for each slot inside." }, | ||
"sx": { | ||
"description": "The system prop that allows defining system overrides as well as additional CSS styles." | ||
}, | ||
"variant": { | ||
"description": "The <a href=\"https://mui.com/joy-ui/main-features/global-variants/\">global variant</a> to use." | ||
} | ||
}, | ||
"classDescriptions": { | ||
"root": { "description": "Class name applied to the root element." }, | ||
"anchorOriginTopCenter": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'top', 'center' }}</code>" | ||
}, | ||
"anchorOriginBottomCenter": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'bottom', 'center' }}</code>" | ||
}, | ||
"anchorOriginTopRight": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'top', 'right' }}</code>" | ||
}, | ||
"anchorOriginBottomRight": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'bottom', 'right' }}</code>" | ||
}, | ||
"anchorOriginTopLeft": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'top', 'left' }}</code>" | ||
}, | ||
"anchorOriginBottomLeft": { | ||
"description": "Styles applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>anchorOrigin={{ 'bottom', 'left' }}</code>" | ||
}, | ||
"colorPrimary": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>color=\"primary\"</code>" | ||
}, | ||
"colorDanger": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>color=\"danger\"</code>" | ||
}, | ||
"colorNeutral": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>color=\"neutral\"</code>" | ||
}, | ||
"colorSuccess": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>color=\"success\"</code>" | ||
}, | ||
"colorWarning": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>color=\"warning\"</code>" | ||
}, | ||
"endDecorator": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the endDecorator element", | ||
"conditions": "supplied" | ||
}, | ||
"sizeSm": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>size=\"sm\"</code>" | ||
}, | ||
"sizeMd": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>size=\"md\"</code>" | ||
}, | ||
"sizeLg": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>size=\"lg\"</code>" | ||
}, | ||
"startDecorator": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the startDecorator element", | ||
"conditions": "supplied" | ||
}, | ||
"variantPlain": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>variant=\"plain\"</code>" | ||
}, | ||
"variantOutlined": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>variant=\"outlined\"</code>" | ||
}, | ||
"variantSoft": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>variant=\"soft\"</code>" | ||
}, | ||
"variantSolid": { | ||
"description": "Class name applied to {{nodeName}} if {{conditions}}.", | ||
"nodeName": "the root element", | ||
"conditions": "<code>variant=\"solid\"</code>" | ||
} | ||
}, | ||
"slotDescriptions": { | ||
"root": "The component that renders the root.", | ||
"startDecorator": "The component that renders the start decorator.", | ||
"endDecorator": "The component that renders the end decorator." | ||
} | ||
} |
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
Empty file.
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