diff --git a/docs/data/joy/getting-started/templates/messages/components/Sidebar.tsx b/docs/data/joy/getting-started/templates/messages/components/Sidebar.tsx index b87f727c1cb7d1..8cc4572edc5d53 100644 --- a/docs/data/joy/getting-started/templates/messages/components/Sidebar.tsx +++ b/docs/data/joy/getting-started/templates/messages/components/Sidebar.tsx @@ -19,7 +19,7 @@ import Stack from '@mui/joy/Stack'; import SearchRoundedIcon from '@mui/icons-material/SearchRounded'; import HomeRoundedIcon from '@mui/icons-material/HomeRounded'; import DashboardRoundedIcon from '@mui/icons-material/DashboardRounded'; -import CollectionsBookmarkRoundedIcon from '@mui/icons-material/CollectionsBookmarkRounded'; +import ShoppingCartRoundedIcon from '@mui/icons-material/ShoppingCartRounded'; import AssignmentRoundedIcon from '@mui/icons-material/AssignmentRounded'; import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded'; import GroupRoundedIcon from '@mui/icons-material/GroupRounded'; @@ -27,7 +27,7 @@ import SupportRoundedIcon from '@mui/icons-material/SupportRounded'; import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded'; import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded'; -import BadgeRoundedIcon from '@mui/icons-material/BadgeRounded'; +import BrightnessAutoRoundedIcon from '@mui/icons-material/BrightnessAutoRounded'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import ColorSchemeToggle from './ColorSchemeToggle'; @@ -83,8 +83,7 @@ export default function Sidebar() { height: '100dvh', width: 'var(--Sidebar-width)', top: 0, - p: 1.5, - py: 2, + p: 2, flexShrink: 0, display: 'flex', flexDirection: 'column', @@ -124,9 +123,9 @@ export default function Sidebar() { /> - + - Profiles + Acme Co. } placeholder="Search" /> @@ -169,10 +168,14 @@ export default function Sidebar() { - - + + - Projects + Orders diff --git a/docs/data/joy/getting-started/templates/order-dashboard/App.tsx b/docs/data/joy/getting-started/templates/order-dashboard/App.tsx index 480cf9fa1a626f..5be8b04289b5b8 100644 --- a/docs/data/joy/getting-started/templates/order-dashboard/App.tsx +++ b/docs/data/joy/getting-started/templates/order-dashboard/App.tsx @@ -12,12 +12,10 @@ import ChevronRightRoundedIcon from '@mui/icons-material/ChevronRightRounded'; import DownloadRoundedIcon from '@mui/icons-material/DownloadRounded'; import useScript from './useScript'; -import FirstSidebar from './components/FirstSidebar'; -import SecondSidebar from './components/SecondSidebar'; +import Sidebar from './components/Sidebar'; import OrderTable from './components/OrderTable'; import OrderList from './components/OrderList'; import Header from './components/Header'; -import ColorSchemeToggle from './components/ColorSchemeToggle'; const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect; @@ -39,8 +37,7 @@ export default function JoyOrderDashboardTemplate() {
- - + - - - - - - - - - - - openSidebar()}> - - - - - openSidebar()}> - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/docs/data/joy/getting-started/templates/order-dashboard/components/Header.tsx b/docs/data/joy/getting-started/templates/order-dashboard/components/Header.tsx index d2804b1daac6b7..5a716f84dc4d50 100644 --- a/docs/data/joy/getting-started/templates/order-dashboard/components/Header.tsx +++ b/docs/data/joy/getting-started/templates/order-dashboard/components/Header.tsx @@ -4,7 +4,6 @@ import Sheet from '@mui/joy/Sheet'; import IconButton from '@mui/joy/IconButton'; import MenuIcon from '@mui/icons-material/Menu'; -import ColorSchemeToggle from './ColorSchemeToggle'; import { toggleSidebar } from '../utils'; export default function Header() { @@ -44,7 +43,6 @@ export default function Header() { > - ); } diff --git a/docs/data/joy/getting-started/templates/order-dashboard/components/SecondSidebar.tsx b/docs/data/joy/getting-started/templates/order-dashboard/components/SecondSidebar.tsx deleted file mode 100644 index 5e72e1e900c805..00000000000000 --- a/docs/data/joy/getting-started/templates/order-dashboard/components/SecondSidebar.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import * as React from 'react'; -import Box from '@mui/joy/Box'; -import Sheet from '@mui/joy/Sheet'; -import List from '@mui/joy/List'; -import ListSubheader from '@mui/joy/ListSubheader'; -import ListItem from '@mui/joy/ListItem'; -import ListItemContent from '@mui/joy/ListItemContent'; -import ListItemDecorator from '@mui/joy/ListItemDecorator'; -import ListItemButton from '@mui/joy/ListItemButton'; -// icons -import BubbleChartIcon from '@mui/icons-material/BubbleChart'; -import InsertChartIcon from '@mui/icons-material/InsertChart'; -import StarsIcon from '@mui/icons-material/Stars'; -import ShoppingCartIcon from '@mui/icons-material/ShoppingCart'; -import AccountBoxIcon from '@mui/icons-material/AccountBox'; -import PeopleRoundedIcon from '@mui/icons-material/PeopleRounded'; -import BadgeRoundedIcon from '@mui/icons-material/BadgeRounded'; -import CreditCardRoundedIcon from '@mui/icons-material/CreditCardRounded'; -import AnalyticsRoundedIcon from '@mui/icons-material/AnalyticsRounded'; - -import { closeSidebar } from '../utils'; - -export default function SecondSidebar() { - return ( - - closeSidebar()} - /> - - - - Dashboard - - - closeSidebar()}> - - - - Overview - - - - closeSidebar()}> - - - - Analytics - - - - - - - - Orders - - - - closeSidebar()}> - - - - Saved reports - - - - closeSidebar()}> - - - - User reports - - - - Workspace - - - closeSidebar()}> - - - - Groups - - - - closeSidebar()}> - - - - Authentication - - - - closeSidebar()}> - - - - Billing - - - - closeSidebar()}> - - - - Analytics - - - - - - ); -} diff --git a/docs/data/joy/getting-started/templates/order-dashboard/components/Sidebar.tsx b/docs/data/joy/getting-started/templates/order-dashboard/components/Sidebar.tsx new file mode 100644 index 00000000000000..15c5c1310c47e6 --- /dev/null +++ b/docs/data/joy/getting-started/templates/order-dashboard/components/Sidebar.tsx @@ -0,0 +1,323 @@ +import * as React from 'react'; +import GlobalStyles from '@mui/joy/GlobalStyles'; +import Avatar from '@mui/joy/Avatar'; +import Box from '@mui/joy/Box'; +import Button from '@mui/joy/Button'; +import Card from '@mui/joy/Card'; +import Chip from '@mui/joy/Chip'; +import Divider from '@mui/joy/Divider'; +import IconButton from '@mui/joy/IconButton'; +import Input from '@mui/joy/Input'; +import LinearProgress from '@mui/joy/LinearProgress'; +import List from '@mui/joy/List'; +import ListItem from '@mui/joy/ListItem'; +import ListItemButton, { listItemButtonClasses } from '@mui/joy/ListItemButton'; +import ListItemContent from '@mui/joy/ListItemContent'; +import Typography from '@mui/joy/Typography'; +import Sheet from '@mui/joy/Sheet'; +import Stack from '@mui/joy/Stack'; +import SearchRoundedIcon from '@mui/icons-material/SearchRounded'; +import HomeRoundedIcon from '@mui/icons-material/HomeRounded'; +import DashboardRoundedIcon from '@mui/icons-material/DashboardRounded'; +import ShoppingCartRoundedIcon from '@mui/icons-material/ShoppingCartRounded'; +import AssignmentRoundedIcon from '@mui/icons-material/AssignmentRounded'; +import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded'; +import GroupRoundedIcon from '@mui/icons-material/GroupRounded'; +import SupportRoundedIcon from '@mui/icons-material/SupportRounded'; +import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded'; +import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; +import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded'; +import BrightnessAutoRoundedIcon from '@mui/icons-material/BrightnessAutoRounded'; +import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; + +import ColorSchemeToggle from './ColorSchemeToggle'; +import { closeSidebar } from '../utils'; + +function Toggler({ + defaultExpanded = false, + renderToggle, + children, +}: { + defaultExpanded?: boolean; + children: React.ReactNode; + renderToggle: (params: { + open: boolean; + setOpen: React.Dispatch>; + }) => React.ReactNode; +}) { + const [open, setOpen] = React.useState(defaultExpanded); + return ( + + {renderToggle({ open, setOpen })} + *': { + overflow: 'hidden', + }, + }} + > + {children} + + + ); +} + +export default function Sidebar() { + return ( + + ({ + ':root': { + '--Sidebar-width': '220px', + [theme.breakpoints.up('lg')]: { + '--Sidebar-width': '240px', + }, + }, + })} + /> + closeSidebar()} + /> + + + + + Acme Co. + + + } placeholder="Search" /> + + theme.vars.radius.sm, + }} + > + + + + + Home + + + + + + + + + Dashboard + + + + + + + + + Orders + + + + + + ( + setOpen(!open)}> + + + Tasks + + + + )} + > + + + All tasks + + + Backlog + + + In progress + + + Done + + + + + + + + + + Messages + + + 4 + + + + + + ( + setOpen(!open)}> + + + Users + + + + )} + > + + + + My profile + + + + Create a new user + + + Roles & permission + + + + + + + theme.vars.radius.sm, + '--List-gap': '8px', + mb: 2, + }} + > + + + + Support + + + + + + Settings + + + + + + Used space + + + + + + Your team has used 80% of your available space. Need more? + + + + + + + + + + Siriwat K. + siriwatk@test.com + + + + + + + ); +} diff --git a/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx b/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx index e4e50355a08d80..50c6caba5d3e76 100644 --- a/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx +++ b/docs/data/joy/getting-started/templates/profile-dashboard/components/Sidebar.tsx @@ -19,7 +19,7 @@ import Stack from '@mui/joy/Stack'; import SearchRoundedIcon from '@mui/icons-material/SearchRounded'; import HomeRoundedIcon from '@mui/icons-material/HomeRounded'; import DashboardRoundedIcon from '@mui/icons-material/DashboardRounded'; -import CollectionsBookmarkRoundedIcon from '@mui/icons-material/CollectionsBookmarkRounded'; +import ShoppingCartRoundedIcon from '@mui/icons-material/ShoppingCartRounded'; import AssignmentRoundedIcon from '@mui/icons-material/AssignmentRounded'; import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded'; import GroupRoundedIcon from '@mui/icons-material/GroupRounded'; @@ -27,7 +27,7 @@ import SupportRoundedIcon from '@mui/icons-material/SupportRounded'; import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded'; import CloseRoundedIcon from '@mui/icons-material/CloseRounded'; import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded'; -import BadgeRoundedIcon from '@mui/icons-material/BadgeRounded'; +import BrightnessAutoRoundedIcon from '@mui/icons-material/BrightnessAutoRounded'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import ColorSchemeToggle from './ColorSchemeToggle'; @@ -83,8 +83,7 @@ export default function Sidebar() { height: '100dvh', width: 'var(--Sidebar-width)', top: 0, - p: 1.5, - py: 3, + p: 2, flexShrink: 0, display: 'flex', flexDirection: 'column', @@ -124,9 +123,9 @@ export default function Sidebar() { /> - + - Profiles + Acme Co. } placeholder="Search" /> @@ -169,10 +168,14 @@ export default function Sidebar() { - - + + - Projects + Orders diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg index 5a6eba9397e6a8..ed70f5d8b9fefb 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/framesx-web-blocks.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg index c93c04a0e1810e..de46235dd0cb48 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg index 15a318f7009c4a..52147608e66baa 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/messages.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg index 7ee55d135f7a39..d448efa32337f9 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg index b415d287a70e68..ca647a125f2206 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/order-dashboard.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg index 21b7aa215a9e2b..259453fce3975a 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg index 16e35ff0042c29..aaab9711b742e5 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/profile-dashboard.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg index c22fa87a2ab0c5..bdb26ff182ba82 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard-dark.jpg differ diff --git a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg index c68699ad64aba8..0af0573f4d9600 100644 Binary files a/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg and b/docs/public/static/screenshots/joy-ui/getting-started/templates/rental-dashboard.jpg differ