diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c472c2d482d2..7b30ed05a9c9cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -582,7 +582,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som - 💫 Material UI, Joy UI, and Base UI are compatible with [NextJS App Router](https://nextjs.org/docs/app) (#37656) @mj12albert - 📚 Added new guides for integrating with Next.js 13 App Router (#37656) @mj12albert - Ⓜ️ [Material UI guide](https://mui.com/material-ui/guides/next-js-app-router/) - - 🅙 [Joy UI guide](https://mui.com/joy-ui/guides/next-js-app-router/) + - 🅙 [Joy UI guide](https://mui.com/joy-ui/integrations/next-js-app-router/) - 🅱️ [Base UI guide](https://mui.com/base-ui/guides/next-js-app-router/) - 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements. @@ -10720,7 +10720,7 @@ A big thanks to the 20 contributors who made this release possible. Here are som - [Avatar] Fix usage of srcset property (#23286) @matheuspiment - [ClickAwayListener] Fix mounting behavior in Portals in React 17 (#23315) @eps1lon - [core] Allow React 17 (#23311) @eps1lon -- [Icon] Fix translation, e.g Google Translate (#23237) @cbeltrangomez84 +- [Icon] Fix translation, e.g. Google Translate (#23237) @cbeltrangomez84 - [LinearProgress] Fix Safari's bug during composition of different paint (#23293) @montogeek - [Radio] Fix dot misalignment in Safari (#23239) @anasufana - [styled-engine] Fix tagged template syntax with multiple expressions (#23269) @eps1lon diff --git a/CHANGELOG.old.md b/CHANGELOG.old.md index 816fa38fd39b72..a0f4ca75ea0322 100644 --- a/CHANGELOG.old.md +++ b/CHANGELOG.old.md @@ -5540,7 +5540,7 @@ you to add them up quickly in your head without having to worry about decimals. - [docs] Fix search suggestions on dark mode (#13874) @rfbotto - [docs] Add accessibility section to selection-controls with demo (#13896) @wyseguyonline -- [docs] Add support for multiple demo variants e.g JS or Hooks (#13873) @adeelibr +- [docs] Add support for multiple demo variants e.g. JS or Hooks (#13873) @adeelibr - [docs] Remove the withRoot HOC (#13909) @oliviertassinari - [docs] Add material-ui-pickers in pickers page (#13697) @dmtrKovalenko - [docs] Continue #13806 and port back some fix from @system (#13917) @oliviertassinari diff --git a/docs/.link-check-errors.txt b/docs/.link-check-errors.txt index fa2fd09db8da38..4f82b8fd7ece91 100644 --- a/docs/.link-check-errors.txt +++ b/docs/.link-check-errors.txt @@ -1,5 +1,4 @@ Broken links found by `yarn docs:link-check` that exist: - https://mui.com/blog/material-ui-v4-is-out/#premium-themes-store-✨ -- https://mui.com/joy-ui/integrations/material-ui/ - https://mui.com/size-snapshot diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js index 9aa53294a34be7..73c984e5efc078 100644 --- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js +++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.js @@ -155,7 +155,7 @@ const StyledAutocompleteRoot = styled('div')( padding-right: 5px; overflow: hidden; width: 320px; - + &.focused { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; @@ -264,7 +264,7 @@ const StyledPopupIndicator = styled(Button)( background-color: transparent; align-self: center; padding: 0 2px; - + &:hover { background-color: ${theme.palette.mode === 'dark' ? grey[700] : blue[100]}; cursor: pointer; @@ -289,7 +289,7 @@ const StyledClearIndicator = styled(Button)( background-color: transparent; align-self: center; padding: 0 2px; - + &:hover { background-color: ${theme.palette.mode === 'dark' ? grey[700] : blue[100]}; cursor: pointer; diff --git a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx index 1d465838034b49..394748ee3e017d 100644 --- a/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx +++ b/docs/data/base/components/autocomplete/AutocompleteIntroduction/system/index.tsx @@ -138,7 +138,7 @@ const StyledAutocompleteRoot = styled('div')( padding-right: 5px; overflow: hidden; width: 320px; - + &.focused { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; @@ -247,7 +247,7 @@ const StyledPopupIndicator = styled(Button)( background-color: transparent; align-self: center; padding: 0 2px; - + &:hover { background-color: ${theme.palette.mode === 'dark' ? grey[700] : blue[100]}; cursor: pointer; @@ -272,7 +272,7 @@ const StyledClearIndicator = styled(Button)( background-color: transparent; align-self: center; padding: 0 2px; - + &:hover { background-color: ${theme.palette.mode === 'dark' ? grey[700] : blue[100]}; cursor: pointer; diff --git a/docs/data/base/components/button/UnstyledButtonCustom.js b/docs/data/base/components/button/UnstyledButtonCustom.js index f24ea77300da7e..4f4e2399fafeaf 100644 --- a/docs/data/base/components/button/UnstyledButtonCustom.js +++ b/docs/data/base/components/button/UnstyledButtonCustom.js @@ -53,7 +53,7 @@ const CustomButtonRoot = styled(ButtonRoot)( transition: all 800ms ease; pointer-events: none; } - + & .bg { stroke: var(--main-color); stroke-width: 1; @@ -86,7 +86,7 @@ const CustomButtonRoot = styled(ButtonRoot)( outline-offset: 2px; } - &.${buttonClasses.active} { + &.${buttonClasses.active} { & .bg { fill: var(--active-color); transition: fill 300ms ease-out; diff --git a/docs/data/base/components/button/UnstyledButtonCustom.tsx b/docs/data/base/components/button/UnstyledButtonCustom.tsx index 6733dee6f7e020..72413739662779 100644 --- a/docs/data/base/components/button/UnstyledButtonCustom.tsx +++ b/docs/data/base/components/button/UnstyledButtonCustom.tsx @@ -54,7 +54,7 @@ const CustomButtonRoot = styled(ButtonRoot)( transition: all 800ms ease; pointer-events: none; } - + & .bg { stroke: var(--main-color); stroke-width: 1; @@ -87,7 +87,7 @@ const CustomButtonRoot = styled(ButtonRoot)( outline-offset: 2px; } - &.${buttonClasses.active} { + &.${buttonClasses.active} { & .bg { fill: var(--active-color); transition: fill 300ms ease-out; diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js index 1caf7cb2550212..f7cdde1f0fd0be 100644 --- a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js +++ b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.js @@ -54,12 +54,11 @@ function Styles() { .CustomButton:active:not(.${buttonClasses.disabled}) { background-color: ${cyan[700]}; } - + .${buttonClasses.disabled} { opacity: 0.5; cursor: not-allowed; - - + } `} ); diff --git a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx index 1caf7cb2550212..f7cdde1f0fd0be 100644 --- a/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx +++ b/docs/data/base/components/button/UnstyledButtonsSimple/css/index.tsx @@ -54,12 +54,11 @@ function Styles() { .CustomButton:active:not(.${buttonClasses.disabled}) { background-color: ${cyan[700]}; } - + .${buttonClasses.disabled} { opacity: 0.5; cursor: not-allowed; - - + } `} ); diff --git a/docs/data/base/components/form-control/BasicFormControl/system/index.js b/docs/data/base/components/form-control/BasicFormControl/system/index.js index 74956e018b87b0..f2b89b5af1061b 100644 --- a/docs/data/base/components/form-control/BasicFormControl/system/index.js +++ b/docs/data/base/components/form-control/BasicFormControl/system/index.js @@ -16,7 +16,7 @@ export default function BasicFormControl() { const StyledInput = styled(Input)( ({ theme }) => ` - + .${inputClasses.input} { width: 320px; font-size: 0.875rem; diff --git a/docs/data/base/components/form-control/BasicFormControl/system/index.tsx b/docs/data/base/components/form-control/BasicFormControl/system/index.tsx index 3b3d38e15c2cd4..a76d389e9f983c 100644 --- a/docs/data/base/components/form-control/BasicFormControl/system/index.tsx +++ b/docs/data/base/components/form-control/BasicFormControl/system/index.tsx @@ -16,7 +16,7 @@ export default function BasicFormControl() { const StyledInput = styled(Input)( ({ theme }) => ` - + .${inputClasses.input} { width: 320px; font-size: 0.875rem; diff --git a/docs/data/base/components/form-control/FormControlFunctionChild.js b/docs/data/base/components/form-control/FormControlFunctionChild.js index 2710be182fb482..1d15c03b3e2ff4 100644 --- a/docs/data/base/components/form-control/FormControlFunctionChild.js +++ b/docs/data/base/components/form-control/FormControlFunctionChild.js @@ -18,7 +18,6 @@ export default function FormControlFunctionChild() { const StyledInput = styled(Input)( ({ theme }) => ` - display: inline-block; .${inputClasses.input} { diff --git a/docs/data/base/components/form-control/FormControlFunctionChild.tsx b/docs/data/base/components/form-control/FormControlFunctionChild.tsx index 0ec778fa20ae5a..2ec9f57b26b993 100644 --- a/docs/data/base/components/form-control/FormControlFunctionChild.tsx +++ b/docs/data/base/components/form-control/FormControlFunctionChild.tsx @@ -18,7 +18,6 @@ export default function FormControlFunctionChild() { const StyledInput = styled(Input)( ({ theme }) => ` - display: inline-block; .${inputClasses.input} { diff --git a/docs/data/base/components/input/UnstyledInputBasic/css/index.js b/docs/data/base/components/input/UnstyledInputBasic/css/index.js index f115837b61c88c..a64877d635bed1 100644 --- a/docs/data/base/components/input/UnstyledInputBasic/css/index.js +++ b/docs/data/base/components/input/UnstyledInputBasic/css/index.js @@ -65,16 +65,16 @@ function Styles() { background: ${isDarkMode ? grey[900] : '#fff'}; border: 1px solid ${isDarkMode ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${isDarkMode ? grey[900] : grey[50]}; - + &:hover { border-color: ${cyan[400]}; } - + &:focus { border-color: ${cyan[400]}; box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]}; } - + &:focus-visible { outline: 0; } diff --git a/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx b/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx index f115837b61c88c..a64877d635bed1 100644 --- a/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx +++ b/docs/data/base/components/input/UnstyledInputBasic/css/index.tsx @@ -65,16 +65,16 @@ function Styles() { background: ${isDarkMode ? grey[900] : '#fff'}; border: 1px solid ${isDarkMode ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${isDarkMode ? grey[900] : grey[50]}; - + &:hover { border-color: ${cyan[400]}; } - + &:focus { border-color: ${cyan[400]}; box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]}; } - + &:focus-visible { outline: 0; } diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js index ddf9d9f8f09a9b..7db613fae34b34 100644 --- a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js +++ b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.js @@ -65,11 +65,11 @@ function Styles() { background: ${isDarkMode ? grey[900] : '#fff'}; border: 1px solid ${isDarkMode ? grey[700] : grey[200]}; box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]}; - + &:hover { border-color: ${cyan[400]}; } - + &:focus { border-color: ${cyan[400]}; box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]}; diff --git a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx index ddf9d9f8f09a9b..7db613fae34b34 100644 --- a/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx +++ b/docs/data/base/components/input/UnstyledInputIntroduction/css/index.tsx @@ -65,11 +65,11 @@ function Styles() { background: ${isDarkMode ? grey[900] : '#fff'}; border: 1px solid ${isDarkMode ? grey[700] : grey[200]}; box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]}; - + &:hover { border-color: ${cyan[400]}; } - + &:focus { border-color: ${cyan[400]}; box-shadow: 0 0 0 3px ${isDarkMode ? cyan[600] : cyan[200]}; diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.js b/docs/data/base/components/menu/MenuIntroduction/css/index.js new file mode 100644 index 00000000000000..6e0530275de76e --- /dev/null +++ b/docs/data/base/components/menu/MenuIntroduction/css/index.js @@ -0,0 +1,163 @@ +import * as React from 'react'; +import { Menu } from '@mui/base/Menu'; +import { MenuItem, menuItemClasses } from '@mui/base/MenuItem'; +import { MenuButton } from '@mui/base/MenuButton'; +import { Dropdown } from '@mui/base/Dropdown'; +import { useTheme } from '@mui/system'; + +export default function MenuIntroduction() { + const createHandleMenuClick = (menuItem) => { + return () => { + console.log(`Clicked on ${menuItem}`); + }; + }; + + return ( + + My account + + + + Profile + + + Language settings + + + Log out + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +const grey = { + 50: '#f6f8fa', + 100: '#eaeef2', + 200: '#d0d7de', + 300: '#afb8c1', + 400: '#8c959f', + 500: '#6e7781', + 600: '#57606a', + 700: '#424a53', + 800: '#32383f', + 900: '#24292f', +}; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +function Styles() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + return ( + + ); +} diff --git a/docs/data/base/components/menu/MenuIntroduction/css/index.tsx b/docs/data/base/components/menu/MenuIntroduction/css/index.tsx new file mode 100644 index 00000000000000..70ee0fda43b8c4 --- /dev/null +++ b/docs/data/base/components/menu/MenuIntroduction/css/index.tsx @@ -0,0 +1,163 @@ +import * as React from 'react'; +import { Menu } from '@mui/base/Menu'; +import { MenuItem, menuItemClasses } from '@mui/base/MenuItem'; +import { MenuButton } from '@mui/base/MenuButton'; +import { Dropdown } from '@mui/base/Dropdown'; +import { useTheme } from '@mui/system'; + +export default function MenuIntroduction() { + const createHandleMenuClick = (menuItem: string) => { + return () => { + console.log(`Clicked on ${menuItem}`); + }; + }; + + return ( + + My account + + + + Profile + + + Language settings + + + Log out + + + + + ); +} + +const cyan = { + 50: '#E9F8FC', + 100: '#BDEBF4', + 200: '#99D8E5', + 300: '#66BACC', + 400: '#1F94AD', + 500: '#0D5463', + 600: '#094855', + 700: '#063C47', + 800: '#043039', + 900: '#022127', +}; + +const grey = { + 50: '#f6f8fa', + 100: '#eaeef2', + 200: '#d0d7de', + 300: '#afb8c1', + 400: '#8c959f', + 500: '#6e7781', + 600: '#57606a', + 700: '#424a53', + 800: '#32383f', + 900: '#24292f', +}; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +function Styles() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + return ( + + ); +} diff --git a/docs/data/base/components/menu/MenuIntroduction.js b/docs/data/base/components/menu/MenuIntroduction/system/index.js similarity index 97% rename from docs/data/base/components/menu/MenuIntroduction.js rename to docs/data/base/components/menu/MenuIntroduction/system/index.js index a253fc53084fc8..91550b9e6f8d93 100644 --- a/docs/data/base/components/menu/MenuIntroduction.js +++ b/docs/data/base/components/menu/MenuIntroduction/system/index.js @@ -19,7 +19,7 @@ export default function MenuIntroduction() { Profile - + Language settings diff --git a/docs/data/base/components/menu/MenuIntroduction.tsx b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx similarity index 97% rename from docs/data/base/components/menu/MenuIntroduction.tsx rename to docs/data/base/components/menu/MenuIntroduction/system/index.tsx index 353249d85e1371..7b56956e446509 100644 --- a/docs/data/base/components/menu/MenuIntroduction.tsx +++ b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx @@ -19,7 +19,7 @@ export default function MenuIntroduction() { Profile - + Language settings diff --git a/docs/data/base/components/menu/MenuIntroduction.tsx.preview b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx.preview similarity index 83% rename from docs/data/base/components/menu/MenuIntroduction.tsx.preview rename to docs/data/base/components/menu/MenuIntroduction/system/index.tsx.preview index 7a4c6378fff017..a67a0b2474189b 100644 --- a/docs/data/base/components/menu/MenuIntroduction.tsx.preview +++ b/docs/data/base/components/menu/MenuIntroduction/system/index.tsx.preview @@ -4,7 +4,7 @@ Profile - + Language settings diff --git a/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js new file mode 100644 index 00000000000000..6cb844adb3525d --- /dev/null +++ b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.js @@ -0,0 +1,132 @@ +import * as React from 'react'; +import PropTypes from 'prop-types'; +import clsx from 'clsx'; +import { Menu as BaseMenu } from '@mui/base/Menu'; +import { MenuButton as BaseMenuButton } from '@mui/base/MenuButton'; +import { MenuItem as BaseMenuItem } from '@mui/base/MenuItem'; +import { Dropdown } from '@mui/base/Dropdown'; +import { useTheme } from '@mui/system'; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +export default function MenuIntroduction() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + const createHandleMenuClick = (menuItem) => { + return () => { + console.log(`Clicked on ${menuItem}`); + }; + }; + + return ( +
+ + My account + + Profile + + Language settings + + Log out + + +
+ ); +} + +const resolveSlotProps = (fn, args) => (typeof fn === 'function' ? fn(args) : fn); + +const Menu = React.forwardRef((props, ref) => { + // Replace this with your app logic for determining dark modes + const isDarkMode = useIsDarkMode(); + + return ( + { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.root, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + `${isDarkMode ? 'dark' : ''} z-10`, + resolvedSlotProps?.className, + ), + }; + }, + listbox: (ownerState) => { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.listbox, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + 'text-sm box-border font-sans p-1.5 my-3 mx-0 rounded-xl overflow-auto outline-0 bg-white dark:bg-slate-900 border border-solid border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-300 min-w-listbox shadow-md dark:shadow-slate-900', + resolvedSlotProps?.className, + ), + }; + }, + }} + /> + ); +}); + +Menu.propTypes = { + /** + * The props used for each slot inside the Menu. + * @default {} + */ + slotProps: PropTypes.shape({ + listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + }), +}; + +const MenuButton = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); + +MenuButton.propTypes = { + /** + * Class name applied to the root element. + */ + className: PropTypes.string, +}; + +const MenuItem = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); + +MenuItem.propTypes = { + className: PropTypes.string, +}; diff --git a/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx new file mode 100644 index 00000000000000..1f6b7d16cc5903 --- /dev/null +++ b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx @@ -0,0 +1,112 @@ +import * as React from 'react'; +import clsx from 'clsx'; +import { Menu as BaseMenu, MenuProps } from '@mui/base/Menu'; +import { MenuButton as BaseMenuButton, MenuButtonProps } from '@mui/base/MenuButton'; +import { MenuItem as BaseMenuItem, MenuItemProps } from '@mui/base/MenuItem'; +import { Dropdown } from '@mui/base/Dropdown'; +import { useTheme } from '@mui/system'; + +function useIsDarkMode() { + const theme = useTheme(); + return theme.palette.mode === 'dark'; +} + +export default function MenuIntroduction() { + // Replace this with your app logic for determining dark mode + const isDarkMode = useIsDarkMode(); + + const createHandleMenuClick = (menuItem: string) => { + return () => { + console.log(`Clicked on ${menuItem}`); + }; + }; + + return ( +
+ + My account + + Profile + + Language settings + + Log out + + +
+ ); +} + +const resolveSlotProps = (fn: any, args: any) => + typeof fn === 'function' ? fn(args) : fn; + +const Menu = React.forwardRef((props, ref) => { + // Replace this with your app logic for determining dark modes + const isDarkMode = useIsDarkMode(); + + return ( + { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.root, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + `${isDarkMode ? 'dark' : ''} z-10`, + resolvedSlotProps?.className, + ), + }; + }, + listbox: (ownerState) => { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.listbox, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + 'text-sm box-border font-sans p-1.5 my-3 mx-0 rounded-xl overflow-auto outline-0 bg-white dark:bg-slate-900 border border-solid border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-300 min-w-listbox shadow-md dark:shadow-slate-900', + resolvedSlotProps?.className, + ), + }; + }, + }} + /> + ); +}); + +const MenuButton = React.forwardRef( + (props, ref) => { + const { className, ...other } = props; + return ( + + ); + }, +); + +const MenuItem = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); diff --git a/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx.preview b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx.preview new file mode 100644 index 00000000000000..a9e2e559fff817 --- /dev/null +++ b/docs/data/base/components/menu/MenuIntroduction/tailwind/index.tsx.preview @@ -0,0 +1,10 @@ + + My account + + Profile + + Language settings + + Log out + + \ No newline at end of file diff --git a/docs/data/base/components/menu/MenuSimple/css/index.js b/docs/data/base/components/menu/MenuSimple/css/index.js index 817e9ec525430f..0c5e3c2730567f 100644 --- a/docs/data/base/components/menu/MenuSimple/css/index.js +++ b/docs/data/base/components/menu/MenuSimple/css/index.js @@ -140,7 +140,6 @@ function Styles() { cursor: pointer; border: 1px solid ${isDarkMode ? grey[800] : grey[200]}; color: ${isDarkMode ? cyan[300] : cyan[400]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -150,7 +149,7 @@ function Styles() { background: ${isDarkMode ? grey[800] : grey[50]}; border-color: ${isDarkMode ? grey[600] : grey[300]}; } - + .TriggerButton:focus-visible { border-color: ${cyan[400]}; outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]}; diff --git a/docs/data/base/components/menu/MenuSimple/css/index.tsx b/docs/data/base/components/menu/MenuSimple/css/index.tsx index 7941a093d09e0a..90749a10a77fd2 100644 --- a/docs/data/base/components/menu/MenuSimple/css/index.tsx +++ b/docs/data/base/components/menu/MenuSimple/css/index.tsx @@ -140,7 +140,6 @@ function Styles() { cursor: pointer; border: 1px solid ${isDarkMode ? grey[800] : grey[200]}; color: ${isDarkMode ? cyan[300] : cyan[400]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -150,7 +149,7 @@ function Styles() { background: ${isDarkMode ? grey[800] : grey[50]}; border-color: ${isDarkMode ? grey[600] : grey[300]}; } - + .TriggerButton:focus-visible { border-color: ${cyan[400]}; outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]}; diff --git a/docs/data/base/components/menu/MenuSimple/tailwind/index.js b/docs/data/base/components/menu/MenuSimple/tailwind/index.js index 1497c91f85cec5..f56ac73595c42f 100644 --- a/docs/data/base/components/menu/MenuSimple/tailwind/index.js +++ b/docs/data/base/components/menu/MenuSimple/tailwind/index.js @@ -1,7 +1,9 @@ import * as React from 'react'; -import { Menu } from '@mui/base/Menu'; -import { MenuButton } from '@mui/base/MenuButton'; -import { MenuItem } from '@mui/base/MenuItem'; +import PropTypes from 'prop-types'; +import clsx from 'clsx'; +import { Menu as BaseMenu } from '@mui/base/Menu'; +import { MenuButton as BaseMenuButton } from '@mui/base/MenuButton'; +import { MenuItem as BaseMenuItem } from '@mui/base/MenuItem'; import { Dropdown } from '@mui/base/Dropdown'; import { useTheme } from '@mui/system'; @@ -23,41 +25,108 @@ export default function MenuSimple() { return (
- - Dashboard - - - - - Profile - - + Dashboard + + Profile + My account - - Log out - + Log out
); } + +const resolveSlotProps = (fn, args) => (typeof fn === 'function' ? fn(args) : fn); + +const Menu = React.forwardRef((props, ref) => { + // Replace this with your app logic for determining dark modes + const isDarkMode = useIsDarkMode(); + + return ( + { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.root, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + `${isDarkMode ? 'dark' : ''} z-10`, + resolvedSlotProps?.className, + ), + }; + }, + listbox: (ownerState) => { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.listbox, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + 'text-sm box-border font-sans p-1.5 my-3 mx-0 rounded-xl overflow-auto outline-0 bg-white dark:bg-slate-900 border border-solid border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-300 min-w-listbox shadow-md dark:shadow-slate-900', + resolvedSlotProps?.className, + ), + }; + }, + }} + /> + ); +}); + +Menu.propTypes = { + /** + * The props used for each slot inside the Menu. + * @default {} + */ + slotProps: PropTypes.shape({ + listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + }), +}; + +const MenuButton = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); + +MenuButton.propTypes = { + /** + * Class name applied to the root element. + */ + className: PropTypes.string, +}; + +const MenuItem = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); + +MenuItem.propTypes = { + className: PropTypes.string, +}; diff --git a/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx b/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx index 22fdf714067046..e30fb6e2b17f70 100644 --- a/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx +++ b/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; -import { Menu } from '@mui/base/Menu'; -import { MenuButton } from '@mui/base/MenuButton'; -import { MenuItem } from '@mui/base/MenuItem'; +import clsx from 'clsx'; +import { Menu as BaseMenu, MenuProps } from '@mui/base/Menu'; +import { MenuButton as BaseMenuButton, MenuButtonProps } from '@mui/base/MenuButton'; +import { MenuItem as BaseMenuItem, MenuItemProps } from '@mui/base/MenuItem'; import { Dropdown } from '@mui/base/Dropdown'; import { useTheme } from '@mui/system'; @@ -23,41 +24,89 @@ export default function MenuSimple() { return (
- - Dashboard - - - - - Profile - - + Dashboard + + Profile + My account - - Log out - + Log out
); } + +const resolveSlotProps = (fn: any, args: any) => + typeof fn === 'function' ? fn(args) : fn; + +const Menu = React.forwardRef((props, ref) => { + // Replace this with your app logic for determining dark modes + const isDarkMode = useIsDarkMode(); + + return ( + { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.root, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + `${isDarkMode ? 'dark' : ''} z-10`, + resolvedSlotProps?.className, + ), + }; + }, + listbox: (ownerState) => { + const resolvedSlotProps = resolveSlotProps( + props.slotProps?.listbox, + ownerState, + ); + return { + ...resolvedSlotProps, + className: clsx( + 'text-sm box-border font-sans p-1.5 my-3 mx-0 rounded-xl overflow-auto outline-0 bg-white dark:bg-slate-900 border border-solid border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-300 min-w-listbox shadow-md dark:shadow-slate-900', + resolvedSlotProps?.className, + ), + }; + }, + }} + /> + ); +}); + +const MenuButton = React.forwardRef( + (props, ref) => { + const { className, ...other } = props; + return ( + + ); + }, +); + +const MenuItem = React.forwardRef((props, ref) => { + const { className, ...other } = props; + return ( + + ); +}); diff --git a/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx.preview b/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx.preview new file mode 100644 index 00000000000000..f3f4842b95a98b --- /dev/null +++ b/docs/data/base/components/menu/MenuSimple/tailwind/index.tsx.preview @@ -0,0 +1,10 @@ + + Dashboard + + Profile + + My account + + Log out + + \ No newline at end of file diff --git a/docs/data/base/components/menu/UseMenu.js b/docs/data/base/components/menu/UseMenu.js index 1120423f829f3e..2053fb5680b27c 100644 --- a/docs/data/base/components/menu/UseMenu.js +++ b/docs/data/base/components/menu/UseMenu.js @@ -188,16 +188,15 @@ const styles = ` border: 1px solid ${grey[200]}; color: ${grey[900]}; cursor: pointer; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; - + &:hover { background: ${grey[50]}; border-color: ${grey[300]}; } - + &:focus-visible { border-color: ${blue[400]}; outline: 3px solid ${blue[200]}; diff --git a/docs/data/base/components/menu/UseMenu.tsx b/docs/data/base/components/menu/UseMenu.tsx index a512bc2d2bab3e..129b7b2615f71b 100644 --- a/docs/data/base/components/menu/UseMenu.tsx +++ b/docs/data/base/components/menu/UseMenu.tsx @@ -187,16 +187,15 @@ const styles = ` border: 1px solid ${grey[200]}; color: ${grey[900]}; cursor: pointer; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; - + &:hover { background: ${grey[50]}; border-color: ${grey[300]}; } - + &:focus-visible { border-color: ${blue[400]}; outline: 3px solid ${blue[200]}; diff --git a/docs/data/base/components/menu/menu.md b/docs/data/base/components/menu/menu.md index e0f7bc02fcc7ce..becfe81dbd3554 100644 --- a/docs/data/base/components/menu/menu.md +++ b/docs/data/base/components/menu/menu.md @@ -23,7 +23,7 @@ It renders an unordered list (`
    `) by default. Use the Menu Item to add items to the Menu. These are rendered as `
  • ` elements. -{{"demo": "MenuIntroduction.js", "defaultCodeOpen": false, "bg": "gradient"}} +{{"demo": "MenuIntroduction", "defaultCodeOpen": false, "bg": "gradient"}} ## Components diff --git a/docs/data/base/components/number-input/NumberInputBasic/system/index.js b/docs/data/base/components/number-input/NumberInputBasic/system/index.js index b5920b72210369..2a708e438c961e 100644 --- a/docs/data/base/components/number-input/NumberInputBasic/system/index.js +++ b/docs/data/base/components/number-input/NumberInputBasic/system/index.js @@ -126,7 +126,6 @@ const StyledButton = styled('button')( background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 0; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -141,7 +140,7 @@ const StyledButton = styled('button')( grid-column: 2/3; grid-row: 1/2; } - + &.${numberInputClasses.decrementButton} { grid-column: 2/3; grid-row: 2/3; diff --git a/docs/data/base/components/number-input/NumberInputBasic/system/index.tsx b/docs/data/base/components/number-input/NumberInputBasic/system/index.tsx index 0c6d88aa426446..57e0b14b9cbf23 100644 --- a/docs/data/base/components/number-input/NumberInputBasic/system/index.tsx +++ b/docs/data/base/components/number-input/NumberInputBasic/system/index.tsx @@ -130,7 +130,6 @@ const StyledButton = styled('button')( background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 0; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -145,7 +144,7 @@ const StyledButton = styled('button')( grid-column: 2/3; grid-row: 1/2; } - + &.${numberInputClasses.decrementButton} { grid-column: 2/3; grid-row: 2/3; diff --git a/docs/data/base/components/number-input/NumberInputIntroduction.js b/docs/data/base/components/number-input/NumberInputIntroduction.js index d0518191dbbbd2..08b7d982256a42 100644 --- a/docs/data/base/components/number-input/NumberInputIntroduction.js +++ b/docs/data/base/components/number-input/NumberInputIntroduction.js @@ -121,7 +121,6 @@ const StyledButton = styled('button')( background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 0; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -136,7 +135,7 @@ const StyledButton = styled('button')( grid-column: 2/3; grid-row: 1/2; } - + &.${numberInputClasses.decrementButton} { grid-column: 2/3; grid-row: 2/3; diff --git a/docs/data/base/components/number-input/NumberInputIntroduction.tsx b/docs/data/base/components/number-input/NumberInputIntroduction.tsx index fbab0df46eda37..41c83fc1a34bbe 100644 --- a/docs/data/base/components/number-input/NumberInputIntroduction.tsx +++ b/docs/data/base/components/number-input/NumberInputIntroduction.tsx @@ -125,7 +125,6 @@ const StyledButton = styled('button')( background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 0; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -140,7 +139,7 @@ const StyledButton = styled('button')( grid-column: 2/3; grid-row: 1/2; } - + &.${numberInputClasses.decrementButton} { grid-column: 2/3; grid-row: 2/3; diff --git a/docs/data/base/components/number-input/QuantityInput/system/index.js b/docs/data/base/components/number-input/QuantityInput/system/index.js index bb48c57411a7a8..d6e947347003a6 100644 --- a/docs/data/base/components/number-input/QuantityInput/system/index.js +++ b/docs/data/base/components/number-input/QuantityInput/system/index.js @@ -60,7 +60,6 @@ const StyledInputRoot = styled('div')( font-family: IBM Plex Sans, sans-serif; font-weight: 400; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]}; - display: flex; flex-flow: row nowrap; justify-content: center; @@ -110,14 +109,12 @@ const StyledButton = styled('button')( border-radius: 999px; color: ${theme.palette.mode === 'dark' ? blue[300] : blue[600]}; background: transparent; - width: 40px; height: 40px; display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/number-input/QuantityInput/system/index.tsx b/docs/data/base/components/number-input/QuantityInput/system/index.tsx index 4cd346988c5225..a9ef7fcfa7dc1b 100644 --- a/docs/data/base/components/number-input/QuantityInput/system/index.tsx +++ b/docs/data/base/components/number-input/QuantityInput/system/index.tsx @@ -66,7 +66,6 @@ const StyledInputRoot = styled('div')( font-family: IBM Plex Sans, sans-serif; font-weight: 400; color: ${theme.palette.mode === 'dark' ? grey[300] : grey[500]}; - display: flex; flex-flow: row nowrap; justify-content: center; @@ -116,14 +115,12 @@ const StyledButton = styled('button')( border-radius: 999px; color: ${theme.palette.mode === 'dark' ? blue[300] : blue[600]}; background: transparent; - width: 40px; height: 40px; display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/popper/UnstyledPopperBasic/css/index.js b/docs/data/base/components/popper/UnstyledPopperBasic/css/index.js index 2139fc1f221472..707d9c7aa48701 100644 --- a/docs/data/base/components/popper/UnstyledPopperBasic/css/index.js +++ b/docs/data/base/components/popper/UnstyledPopperBasic/css/index.js @@ -66,7 +66,6 @@ function Styles() { const isDarkMode = useIsDarkMode(); return ( ); diff --git a/docs/data/base/components/popup/UnstyledPopupIntroduction/css/index.tsx b/docs/data/base/components/popup/UnstyledPopupIntroduction/css/index.tsx index afaeb697b58c9f..be870592eddfaf 100644 --- a/docs/data/base/components/popup/UnstyledPopupIntroduction/css/index.tsx +++ b/docs/data/base/components/popup/UnstyledPopupIntroduction/css/index.tsx @@ -62,40 +62,38 @@ function Styles() { // Replace this with your app logic for determining dark mode const isDarkMode = useIsDarkMode(); return ( - ); diff --git a/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.js b/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.js index c85a1bacb30954..16f99ef827b9ae 100644 --- a/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.js +++ b/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.js @@ -101,9 +101,6 @@ function Styles() { color: ${isDarkMode ? grey[300] : grey[900]}; position: relative; box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]}; - - - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -118,7 +115,6 @@ function Styles() { outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]}; } - & > svg { font-size: 1rem; position: absolute; diff --git a/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.tsx b/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.tsx index 00c6ae2d818f05..f67e0106e645ab 100644 --- a/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.tsx +++ b/docs/data/base/components/select/UnstyledSelectIntroduction/css/index.tsx @@ -101,9 +101,6 @@ function Styles() { color: ${isDarkMode ? grey[300] : grey[900]}; position: relative; box-shadow: 0px 2px 24px ${isDarkMode ? cyan[800] : cyan[100]}; - - - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -118,7 +115,6 @@ function Styles() { outline: 3px solid ${isDarkMode ? cyan[500] : cyan[200]}; } - & > svg { font-size: 1rem; position: absolute; diff --git a/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.js b/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.js index eec5c0e0c3291a..bb36790e37b6ec 100644 --- a/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.js +++ b/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.js @@ -77,7 +77,7 @@ function Styles() { from { transform: translateX(100%); } - + to { transform: translateX(0); } diff --git a/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.tsx b/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.tsx index eec5c0e0c3291a..bb36790e37b6ec 100644 --- a/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.tsx +++ b/docs/data/base/components/snackbar/UnstyledSnackbar/css/index.tsx @@ -77,7 +77,7 @@ function Styles() { from { transform: translateX(100%); } - + to { transform: translateX(0); } diff --git a/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.js b/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.js index 79f7b301d975af..f78872f16b33bf 100644 --- a/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.js +++ b/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.js @@ -137,7 +137,7 @@ function Styles() { from { transform: translateX(100%); } - + to { transform: translateX(0); } diff --git a/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.tsx b/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.tsx index 547ae8229d9ba8..b7828d6d12f200 100644 --- a/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.tsx +++ b/docs/data/base/components/snackbar/UnstyledSnackbarIntroduction/css/index.tsx @@ -138,7 +138,7 @@ function Styles() { from { transform: translateX(100%); } - + to { transform: translateX(0); } diff --git a/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.js b/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.js index 47b8a3082e0ff0..bb919c7d2e33ad 100644 --- a/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.js +++ b/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.js @@ -112,7 +112,6 @@ function Styles() { border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -150,7 +149,7 @@ function Styles() { z-index: 1; margin: 0; } - + `} ); diff --git a/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.tsx b/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.tsx index 47b8a3082e0ff0..bb919c7d2e33ad 100644 --- a/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.tsx +++ b/docs/data/base/components/switch/UnstyledSwitchIntroduction/css/index.tsx @@ -112,7 +112,6 @@ function Styles() { border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; @@ -150,7 +149,7 @@ function Styles() { z-index: 1; margin: 0; } - + `} ); diff --git a/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.js b/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.js index b8e5ab6425583e..331b17a4a60c57 100644 --- a/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.js +++ b/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.js @@ -81,7 +81,6 @@ const Root = styled('span')( border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.tsx b/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.tsx index b8e5ab6425583e..331b17a4a60c57 100644 --- a/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.tsx +++ b/docs/data/base/components/switch/UnstyledSwitchIntroduction/system/index.tsx @@ -81,7 +81,6 @@ const Root = styled('span')( border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/switch/UnstyledSwitches.js b/docs/data/base/components/switch/UnstyledSwitches.js index 38edba2147b0c4..23c54478e38776 100644 --- a/docs/data/base/components/switch/UnstyledSwitches.js +++ b/docs/data/base/components/switch/UnstyledSwitches.js @@ -81,7 +81,6 @@ const Root = styled('span')( border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/switch/UnstyledSwitches.tsx b/docs/data/base/components/switch/UnstyledSwitches.tsx index 38edba2147b0c4..23c54478e38776 100644 --- a/docs/data/base/components/switch/UnstyledSwitches.tsx +++ b/docs/data/base/components/switch/UnstyledSwitches.tsx @@ -81,7 +81,6 @@ const Root = styled('span')( border-radius: 16px; background-color: #fff; position: relative; - transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 120ms; diff --git a/docs/data/base/components/table-pagination/TableCustomized/css/index.js b/docs/data/base/components/table-pagination/TableCustomized/css/index.js index 01d52b207f299a..9c4d968a0688d6 100644 --- a/docs/data/base/components/table-pagination/TableCustomized/css/index.js +++ b/docs/data/base/components/table-pagination/TableCustomized/css/index.js @@ -164,7 +164,7 @@ function Styles() { .TablePaginationDemo th { background-color: ${isDarkMode ? cyan[800] : cyan[50]}; } - + .CustomTablePagination .${classes.spacer} { display: none; } diff --git a/docs/data/base/components/table-pagination/TableCustomized/css/index.tsx b/docs/data/base/components/table-pagination/TableCustomized/css/index.tsx index c3f9fae825ca22..c924d1d72ffb2a 100644 --- a/docs/data/base/components/table-pagination/TableCustomized/css/index.tsx +++ b/docs/data/base/components/table-pagination/TableCustomized/css/index.tsx @@ -169,7 +169,7 @@ function Styles() { .TablePaginationDemo th { background-color: ${isDarkMode ? cyan[800] : cyan[50]}; } - + .CustomTablePagination .${classes.spacer} { display: none; } diff --git a/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.js b/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.js index b11fa85653c4a4..b576613dc8e31b 100644 --- a/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.js +++ b/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.js @@ -93,10 +93,12 @@ function Styles() { .TablePaginationIntroductionDemo { width: 500px; max-width: 100%; - } + } + th { background-color: ${isDarkMode ? grey[900] : '#fff'}; } + .TablePaginationIntroductionDemo table { font-family: IBM Plex Sans, sans-serif; font-size: 0.875rem; @@ -116,7 +118,7 @@ function Styles() { .TablePaginationIntroductionDemo th { background-color: ${isDarkMode ? grey[900] : '#fff'}; } - + .CustomTablePagination .${classes.spacer} { display: none; } diff --git a/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.tsx b/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.tsx index 658aa2b87d49a8..43b582907026ed 100644 --- a/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.tsx +++ b/docs/data/base/components/table-pagination/UnstyledPaginationIntroduction/css/index.tsx @@ -98,10 +98,12 @@ function Styles() { .TablePaginationIntroductionDemo { width: 500px; max-width: 100%; - } + } + th { background-color: ${isDarkMode ? grey[900] : '#fff'}; } + .TablePaginationIntroductionDemo table { font-family: IBM Plex Sans, sans-serif; font-size: 0.875rem; @@ -121,7 +123,7 @@ function Styles() { .TablePaginationIntroductionDemo th { background-color: ${isDarkMode ? grey[900] : '#fff'}; } - + .CustomTablePagination .${classes.spacer} { display: none; } diff --git a/docs/data/base/components/textarea-autosize/EmptyTextarea.js b/docs/data/base/components/textarea-autosize/EmptyTextarea.js index 1b69b87b439a68..48d27659bfde96 100644 --- a/docs/data/base/components/textarea-autosize/EmptyTextarea.js +++ b/docs/data/base/components/textarea-autosize/EmptyTextarea.js @@ -38,16 +38,16 @@ export default function EmptyTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/EmptyTextarea.tsx b/docs/data/base/components/textarea-autosize/EmptyTextarea.tsx index 1b69b87b439a68..48d27659bfde96 100644 --- a/docs/data/base/components/textarea-autosize/EmptyTextarea.tsx +++ b/docs/data/base/components/textarea-autosize/EmptyTextarea.tsx @@ -38,16 +38,16 @@ export default function EmptyTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/MaxHeightTextarea.js b/docs/data/base/components/textarea-autosize/MaxHeightTextarea.js index 4a851b38eae588..01b8b5dee5199e 100644 --- a/docs/data/base/components/textarea-autosize/MaxHeightTextarea.js +++ b/docs/data/base/components/textarea-autosize/MaxHeightTextarea.js @@ -38,16 +38,16 @@ export default function MaxHeightTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/MaxHeightTextarea.tsx b/docs/data/base/components/textarea-autosize/MaxHeightTextarea.tsx index 4a851b38eae588..01b8b5dee5199e 100644 --- a/docs/data/base/components/textarea-autosize/MaxHeightTextarea.tsx +++ b/docs/data/base/components/textarea-autosize/MaxHeightTextarea.tsx @@ -38,16 +38,16 @@ export default function MaxHeightTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/MinHeightTextarea.js b/docs/data/base/components/textarea-autosize/MinHeightTextarea.js index abb9bb169098f4..1324d251d63b04 100644 --- a/docs/data/base/components/textarea-autosize/MinHeightTextarea.js +++ b/docs/data/base/components/textarea-autosize/MinHeightTextarea.js @@ -38,16 +38,16 @@ export default function MinHeightTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/MinHeightTextarea.tsx b/docs/data/base/components/textarea-autosize/MinHeightTextarea.tsx index abb9bb169098f4..1324d251d63b04 100644 --- a/docs/data/base/components/textarea-autosize/MinHeightTextarea.tsx +++ b/docs/data/base/components/textarea-autosize/MinHeightTextarea.tsx @@ -38,16 +38,16 @@ export default function MinHeightTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.js b/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.js index ad68709ff1f1b2..8f6344393c8e47 100644 --- a/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.js +++ b/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.js @@ -75,10 +75,10 @@ function Styles() { box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]}; outline: none; } - + // firefox .CustomTextarea:focus-visible { - outline: 0; + outline: 0; } `} diff --git a/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.tsx b/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.tsx index ad68709ff1f1b2..8f6344393c8e47 100644 --- a/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.tsx +++ b/docs/data/base/components/textarea-autosize/UnstyledTextarea/css/index.tsx @@ -75,10 +75,10 @@ function Styles() { box-shadow: 0 0 0 3px ${isDarkMode ? cyan[500] : cyan[200]}; outline: none; } - + // firefox .CustomTextarea:focus-visible { - outline: 0; + outline: 0; } `} diff --git a/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.js b/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.js index e26d0f61e51de2..ae355fd760a508 100644 --- a/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.js +++ b/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.js @@ -38,16 +38,16 @@ export default function EmptyTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.tsx b/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.tsx index e26d0f61e51de2..ae355fd760a508 100644 --- a/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.tsx +++ b/docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.tsx @@ -38,16 +38,16 @@ export default function EmptyTextarea() { background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; - + &:hover { border-color: ${blue[400]}; } - + &:focus { border-color: ${blue[400]}; box-shadow: 0 0 0 3px ${theme.palette.mode === 'dark' ? blue[500] : blue[200]}; } - + // firefox &:focus-visible { outline: 0; diff --git a/docs/data/base/getting-started/customization/PrepareForSlot.js b/docs/data/base/getting-started/customization/PrepareForSlot.js index 99f28a6ecb419a..8eb41a69ead0b5 100644 --- a/docs/data/base/getting-started/customization/PrepareForSlot.js +++ b/docs/data/base/getting-started/customization/PrepareForSlot.js @@ -7,7 +7,7 @@ const LinkSlot = prepareForSlot(Link); export default function PrepareForSlot() { return ( - ); diff --git a/docs/data/base/getting-started/customization/PrepareForSlot.tsx b/docs/data/base/getting-started/customization/PrepareForSlot.tsx index 99f28a6ecb419a..f3bbad2cd5cbc5 100644 --- a/docs/data/base/getting-started/customization/PrepareForSlot.tsx +++ b/docs/data/base/getting-started/customization/PrepareForSlot.tsx @@ -7,7 +7,7 @@ const LinkSlot = prepareForSlot(Link); export default function PrepareForSlot() { return ( - ); diff --git a/docs/data/base/getting-started/customization/PrepareForSlot.tsx.preview b/docs/data/base/getting-started/customization/PrepareForSlot.tsx.preview index 07d5df87210cd4..a6393e1d7e710a 100644 --- a/docs/data/base/getting-started/customization/PrepareForSlot.tsx.preview +++ b/docs/data/base/getting-started/customization/PrepareForSlot.tsx.preview @@ -1,3 +1,3 @@ - \ No newline at end of file diff --git a/docs/data/base/guides/next-js-app-router/next-js-app-router.md b/docs/data/base/guides/next-js-app-router/next-js-app-router.md index 060e3366eee2bc..7fe0a39569e9f4 100644 --- a/docs/data/base/guides/next-js-app-router/next-js-app-router.md +++ b/docs/data/base/guides/next-js-app-router/next-js-app-router.md @@ -195,5 +195,5 @@ export default function Page() { } ``` -Unfortunately, **this does not work in a Server Component** since function props are [non-serializable](https://nextjs.org/docs/getting-started/react-essentials#passing-props-from-server-to-client-components-serialization). -Instead, the Next.js team recommend moving components like these ["to the leaves"](https://nextjs.org/docs/getting-started/react-essentials#moving-client-components-to-the-leaves) to avoid this issue and improve overall performance. +Unfortunately, **this does not work in a Server Component** since function props are [non-serializable](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization). +Instead, the Next.js team recommend moving components like these ["down the tree"](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#moving-client-components-down-the-tree) to avoid this issue and improve overall performance. diff --git a/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.js b/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.js index ccc540e804c1f1..9035d29c01b11d 100644 --- a/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.js +++ b/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.js @@ -80,7 +80,7 @@ export default function FreeSoloCreateOptionDialog() { }} options={top100Films} getOptionLabel={(option) => { - // e.g value selected with enter, right from the input + // e.g. value selected with enter, right from the input if (typeof option === 'string') { return option; } diff --git a/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.tsx b/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.tsx index 0c7439a1936bdc..f0931094d3d28c 100644 --- a/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.tsx +++ b/docs/data/joy/components/autocomplete/FreeSoloCreateOptionDialog.tsx @@ -80,7 +80,7 @@ export default function FreeSoloCreateOptionDialog() { }} options={top100Films} getOptionLabel={(option) => { - // e.g value selected with enter, right from the input + // e.g. value selected with enter, right from the input if (typeof option === 'string') { return option; } diff --git a/docs/data/joy/components/autocomplete/GitHubLabel.tsx b/docs/data/joy/components/autocomplete/GitHubLabel.tsx index 94e9591c81d235..7768c6d826c353 100644 --- a/docs/data/joy/components/autocomplete/GitHubLabel.tsx +++ b/docs/data/joy/components/autocomplete/GitHubLabel.tsx @@ -32,8 +32,11 @@ const Listbox = React.forwardRef((props, ref) => ( export default function GitHubLabel() { const [anchorEl, setAnchorEl] = React.useState(null); - const [value, setValue] = React.useState([labels[1], labels[11]]); - const [pendingValue, setPendingValue] = React.useState([]); + const [value, setValue] = React.useState([ + labels[1], + labels[11], + ]); + const [pendingValue, setPendingValue] = React.useState([]); const handleClick = (event: React.MouseEvent) => { setPendingValue(value); diff --git a/docs/data/joy/components/autocomplete/Virtualize.js b/docs/data/joy/components/autocomplete/Virtualize.js index 8a90d6d736b3dd..68044789df887b 100644 --- a/docs/data/joy/components/autocomplete/Virtualize.js +++ b/docs/data/joy/components/autocomplete/Virtualize.js @@ -56,6 +56,7 @@ const OuterElementType = React.forwardRef((props, ref) => { }); // Adapter for react-window + const ListboxComponent = React.forwardRef(function ListboxComponent(props, ref) { const { children, anchorEl, open, modifiers, ...other } = props; const itemData = []; diff --git a/docs/data/joy/components/linear-progress/LinearProgressCountUp.js b/docs/data/joy/components/linear-progress/LinearProgressCountUp.js new file mode 100644 index 00000000000000..1820a2454047b4 --- /dev/null +++ b/docs/data/joy/components/linear-progress/LinearProgressCountUp.js @@ -0,0 +1,42 @@ +import * as React from 'react'; +import LinearProgress from '@mui/joy/LinearProgress'; +import Typography from '@mui/joy/Typography'; +import { useCountUp } from 'use-count-up'; + +export default function LinearProgressCountUp() { + const { value } = useCountUp({ + isCounting: true, + duration: 5, + easing: 'linear', + start: 0, + end: 75, + onComplete: () => ({ + shouldRepeat: true, + delay: 2, + }), + }); + + return ( + + + LOADING… {`${Math.round(Number(value))}%`} + + + ); +} diff --git a/docs/data/joy/components/linear-progress/LinearProgressCountUp.tsx b/docs/data/joy/components/linear-progress/LinearProgressCountUp.tsx new file mode 100644 index 00000000000000..9c94d97b7c7a5a --- /dev/null +++ b/docs/data/joy/components/linear-progress/LinearProgressCountUp.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +import LinearProgress from '@mui/joy/LinearProgress'; +import Typography from '@mui/joy/Typography'; +import { useCountUp } from 'use-count-up'; + +export default function LinearProgressCountUp() { + const { value } = useCountUp({ + isCounting: true, + duration: 5, + easing: 'linear', + start: 0, + end: 75, + onComplete: () => ({ + shouldRepeat: true, + delay: 2, + }), + }); + + return ( + + + LOADING… {`${Math.round(Number(value!))}%`} + + + ); +} diff --git a/docs/data/joy/components/linear-progress/linear-progress.md b/docs/data/joy/components/linear-progress/linear-progress.md index f243a8819a2cbe..86e866832390d9 100644 --- a/docs/data/joy/components/linear-progress/linear-progress.md +++ b/docs/data/joy/components/linear-progress/linear-progress.md @@ -69,6 +69,14 @@ Provides a number to `thickness` prop to control the bar's stroke width. {{"demo": "LinearProgressThickness.js"}} +## 3rd-party integration + +### use-count-up + +Using the [use-count-up](https://www.npmjs.com/package/use-count-up) package, you can create a counting animation by providing `start`, `end`, and `duration` values. + +{{"demo": "LinearProgressCountUp.js"}} + ## CSS variables playground Play around with all the CSS variables available on the component to see how the design changes. diff --git a/docs/data/joy/components/link/LinkCard.js b/docs/data/joy/components/link/LinkCard.js index c57a7b01024c91..5f9de9339a8596 100644 --- a/docs/data/joy/components/link/LinkCard.js +++ b/docs/data/joy/components/link/LinkCard.js @@ -1,35 +1,22 @@ import * as React from 'react'; import Avatar from '@mui/joy/Avatar'; -import Box from '@mui/joy/Box'; import Card from '@mui/joy/Card'; import Link from '@mui/joy/Link'; import Typography from '@mui/joy/Typography'; -import CenterFocusWeak from '@mui/icons-material/CenterFocusWeak'; export default function LinkCard() { return ( - - - -
    - {/* This could be a heading (eg. h2) depends on your use case. */} - - - Joy UI - - - Components that spark joy! -
    -
    - - Click the and TAB to test the focus - + + + + Joy UI + Components that spark joy! + ); } diff --git a/docs/data/joy/components/link/LinkCard.tsx b/docs/data/joy/components/link/LinkCard.tsx index c57a7b01024c91..5f9de9339a8596 100644 --- a/docs/data/joy/components/link/LinkCard.tsx +++ b/docs/data/joy/components/link/LinkCard.tsx @@ -1,35 +1,22 @@ import * as React from 'react'; import Avatar from '@mui/joy/Avatar'; -import Box from '@mui/joy/Box'; import Card from '@mui/joy/Card'; import Link from '@mui/joy/Link'; import Typography from '@mui/joy/Typography'; -import CenterFocusWeak from '@mui/icons-material/CenterFocusWeak'; export default function LinkCard() { return ( - - - -
    - {/* This could be a heading (eg. h2) depends on your use case. */} - - - Joy UI - - - Components that spark joy! -
    -
    - - Click the and TAB to test the focus - + + + + Joy UI + Components that spark joy! + ); } diff --git a/docs/data/joy/components/link/LinkCard.tsx.preview b/docs/data/joy/components/link/LinkCard.tsx.preview new file mode 100644 index 00000000000000..ae5e9a1a227473 --- /dev/null +++ b/docs/data/joy/components/link/LinkCard.tsx.preview @@ -0,0 +1,12 @@ + + + + Joy UI + Components that spark joy! + + \ No newline at end of file diff --git a/docs/data/joy/getting-started/tutorial/tutorial.md b/docs/data/joy/getting-started/tutorial/tutorial.md index 0bbabded8e3fe4..1d88c7e5681684 100644 --- a/docs/data/joy/getting-started/tutorial/tutorial.md +++ b/docs/data/joy/getting-started/tutorial/tutorial.md @@ -256,4 +256,4 @@ Learn more about [different customization approaches](/joy-ui/customization/appr To see some more sophisticated examples of Joy UI in action, check out our [collection of templates](/joy-ui/getting-started/templates/). Are you migrating from Material UI? -Learn how to work with [Joy UI and Material UI together in one app](/joy-ui/integrations/material-ui//). +Learn how to work with [Joy UI and Material UI together in one app](/joy-ui/integrations/material-ui/). diff --git a/docs/data/joy/getting-started/usage/Usage.js b/docs/data/joy/getting-started/usage/Usage.js deleted file mode 100644 index 252375fa938b5d..00000000000000 --- a/docs/data/joy/getting-started/usage/Usage.js +++ /dev/null @@ -1,16 +0,0 @@ -import * as React from 'react'; - -export default function Usage() { - return ( -