@12-apps/ui 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +16 -8
- package/src/button/index.ts +1 -0
- package/src/social-login-button/index.ts +1 -0
- package/src/{social-login-button.tsx → social-login-button/social-login-button.tsx} +5 -5
- package/src/user-avatar/index.ts +1 -0
- package/src/{user-avatar.tsx → user-avatar/user-avatar.tsx} +4 -4
- package/eslint.config.js +0 -89
- package/src/__tests__/data-grid.test.tsx +0 -125
- package/src/__tests__/package-wiring.test.ts +0 -41
- package/src/__tests__/setup.ts +0 -1
- package/src/__tests__/social-login-button.test.tsx +0 -186
- package/src/__tests__/user-avatar.test.tsx +0 -195
- package/src/__tests__/viewport.test.ts +0 -50
- package/src/components/command/__tests__/command.test.tsx +0 -112
- package/src/components/data-display/Alert/Alert.stories.tsx +0 -559
- package/src/components/data-display/Alert/Alert.test.stories.tsx +0 -707
- package/src/components/data-display/AlertDialog/AlertDialog.stories.tsx +0 -362
- package/src/components/data-display/AlertDialog/AlertDialog.test.stories.tsx +0 -763
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.stories.tsx +0 -230
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.test.stories.tsx +0 -270
- package/src/components/data-display/Avatar/Avatar.stories.tsx +0 -721
- package/src/components/data-display/Avatar/Avatar.test.stories.tsx +0 -822
- package/src/components/data-display/Badge/Badge.stories.tsx +0 -1134
- package/src/components/data-display/Badge/Badge.test.stories.tsx +0 -1194
- package/src/components/data-display/Banner/Banner.stories.tsx +0 -528
- package/src/components/data-display/Banner/Banner.test.stories.tsx +0 -511
- package/src/components/data-display/Carousel/Carousel.stories.tsx +0 -607
- package/src/components/data-display/Carousel/Carousel.test.stories.tsx +0 -701
- package/src/components/data-display/Chart/Chart.stories.tsx +0 -568
- package/src/components/data-display/Chart/Chart.test.stories.tsx +0 -174
- package/src/components/data-display/Chart/SpecChart.stories.tsx +0 -150
- package/src/components/data-display/Chart/SpecChart.test.stories.tsx +0 -56
- package/src/components/data-display/Chart/__tests__/SpecChart.test.tsx +0 -60
- package/src/components/data-display/Chart/__tests__/chart-format.test.ts +0 -43
- package/src/components/data-display/Chart/__tests__/chart-spec.test.ts +0 -119
- package/src/components/data-display/Chip/Chip.stories.tsx +0 -252
- package/src/components/data-display/Chip/Chip.test.stories.tsx +0 -266
- package/src/components/data-display/DataGrid/DataGrid.stories.tsx +0 -515
- package/src/components/data-display/DataGrid/DataGrid.test.stories.tsx +0 -653
- package/src/components/data-display/DataViews/__tests__/DataViewsGrid.test.tsx +0 -271
- package/src/components/data-display/DataViews/__tests__/DataViewsTableBase.test.tsx +0 -134
- package/src/components/data-display/DataViews/__tests__/SaveViewModal.test.tsx +0 -83
- package/src/components/data-display/DataViews/__tests__/data-views-filter.test.ts +0 -115
- package/src/components/data-display/DataViews/__tests__/data-views-preview.test.ts +0 -53
- package/src/components/data-display/DataViews/__tests__/range-pill.test.tsx +0 -114
- package/src/components/data-display/DataViews/base-card.stories.tsx +0 -136
- package/src/components/data-display/DescriptionItem/DescriptionItem.stories.tsx +0 -254
- package/src/components/data-display/EmptyState/EmptyState.stories.tsx +0 -282
- package/src/components/data-display/EmptyState/EmptyState.test.stories.tsx +0 -441
- package/src/components/data-display/ErrorState/ErrorState.stories.tsx +0 -110
- package/src/components/data-display/ErrorState/ErrorState.test.stories.tsx +0 -133
- package/src/components/data-display/HoverCard/HoverCard.stories.tsx +0 -650
- package/src/components/data-display/HoverCard/HoverCard.test.stories.tsx +0 -929
- package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.stories.tsx +0 -411
- package/src/components/data-display/LazyImage/LazyImage.stories.tsx +0 -387
- package/src/components/data-display/Lightbox/Lightbox.stories.tsx +0 -315
- package/src/components/data-display/Lightbox/Lightbox.test.stories.tsx +0 -598
- package/src/components/data-display/LoadingState/LoadingState.stories.tsx +0 -124
- package/src/components/data-display/LoadingState/LoadingState.test.stories.tsx +0 -99
- package/src/components/data-display/MapPreview/MapPreview.stories.tsx +0 -458
- package/src/components/data-display/MapPreview/MapPreview.test.stories.tsx +0 -394
- package/src/components/data-display/Popover/Popover.stories.tsx +0 -295
- package/src/components/data-display/Popover/Popover.test.stories.tsx +0 -1162
- package/src/components/data-display/Progress/Progress.stories.tsx +0 -481
- package/src/components/data-display/Progress/Progress.test.stories.tsx +0 -2070
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.stories.tsx +0 -160
- package/src/components/data-display/SectionOnboarding/SectionOnboarding.test.stories.tsx +0 -190
- package/src/components/data-display/Sheet/Sheet.stories.tsx +0 -883
- package/src/components/data-display/Sheet/Sheet.test.stories.tsx +0 -1105
- package/src/components/data-display/StatCard/StatCard.stories.tsx +0 -167
- package/src/components/data-display/StatCard/StatCard.test.stories.tsx +0 -240
- package/src/components/data-display/Stepper/Stepper.stories.tsx +0 -540
- package/src/components/data-display/Stepper/Stepper.test.stories.tsx +0 -600
- package/src/components/data-display/Table/Table.stories.tsx +0 -803
- package/src/components/data-display/Table/Table.test.stories.tsx +0 -369
- package/src/components/data-display/Timeline/Timeline.stories.tsx +0 -442
- package/src/components/data-display/Timeline/Timeline.test.stories.tsx +0 -930
- package/src/components/data-display/TimingDiagram/TimingDiagram.stories.tsx +0 -475
- package/src/components/data-display/TimingDiagram/TimingDiagram.test.stories.tsx +0 -734
- package/src/components/data-display/Tooltip/Tooltip.stories.tsx +0 -468
- package/src/components/data-display/Tooltip/Tooltip.test.stories.tsx +0 -1154
- package/src/components/feedback/ConfirmAction/ConfirmAction.stories.tsx +0 -146
- package/src/components/feedback/ConfirmAction/ConfirmAction.test.stories.tsx +0 -114
- package/src/components/feedback/ConfirmAction/__tests__/confirm-action.test.tsx +0 -288
- package/src/components/feedback/Dialog/Dialog.stories.tsx +0 -833
- package/src/components/feedback/Dialog/Dialog.test.stories.tsx +0 -964
- package/src/components/feedback/Dialog/__tests__/dialog-content-spacing.test.tsx +0 -66
- package/src/components/feedback/Modal/Modal.stories.tsx +0 -765
- package/src/components/feedback/Modal/Modal.test.stories.tsx +0 -251
- package/src/components/feedback/Sonner/Sonner.stories.tsx +0 -698
- package/src/components/feedback/Sonner/Sonner.test.stories.tsx +0 -896
- package/src/components/feedback/StackedModal/StackedModal.stories.tsx +0 -1783
- package/src/components/feedback/StackedModal/StackedModal.test.stories.tsx +0 -973
- package/src/components/feedback/StackedModal/__tests__/stacked-modal-viewport.test.tsx +0 -104
- package/src/components/feedback/Toast/Toast.stories.tsx +0 -548
- package/src/components/feedback/Toast/Toast.test.stories.tsx +0 -834
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.stories.tsx +0 -691
- package/src/components/feedback/TutorialOverlay/TutorialOverlay.test.stories.tsx +0 -634
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.stories.tsx +0 -665
- package/src/components/form/AddressAutocomplete/AddressAutocomplete.test.stories.tsx +0 -727
- package/src/components/form/Autocomplete/Autocomplete.stories.tsx +0 -715
- package/src/components/form/Autocomplete/Autocomplete.test.stories.tsx +0 -825
- package/src/components/form/Button/Button.stories.tsx +0 -365
- package/src/components/form/Button/Button.test.stories.tsx +0 -607
- package/src/components/form/Calendar/Calendar.stories.tsx +0 -349
- package/src/components/form/Calendar/Calendar.test.stories.tsx +0 -464
- package/src/components/form/CepField/CepField.stories.tsx +0 -138
- package/src/components/form/CepField/CepField.test.stories.tsx +0 -281
- package/src/components/form/Checkbox/Checkbox.stories.tsx +0 -265
- package/src/components/form/Checkbox/Checkbox.test.stories.tsx +0 -181
- package/src/components/form/CodeEditor/CodeEditor.stories.tsx +0 -871
- package/src/components/form/CodeEditor/CodeEditor.test.stories.tsx +0 -574
- package/src/components/form/Command/Command.stories.tsx +0 -580
- package/src/components/form/Command/Command.test.stories.tsx +0 -215
- package/src/components/form/CreatableSelect/CreatableSelect.stories.tsx +0 -112
- package/src/components/form/CreatableSelect/CreatableSelect.test.stories.tsx +0 -134
- package/src/components/form/Form/Form.stories.tsx +0 -687
- package/src/components/form/Form/Form.test.stories.tsx +0 -601
- package/src/components/form/Input/Input.stories.tsx +0 -260
- package/src/components/form/Input/Input.test.stories.tsx +0 -1191
- package/src/components/form/InputOTP/InputOTP.stories.tsx +0 -774
- package/src/components/form/InputOTP/InputOTP.test.stories.tsx +0 -588
- package/src/components/form/Label/Label.stories.tsx +0 -473
- package/src/components/form/Label/Label.test.stories.tsx +0 -915
- package/src/components/form/Menubar/Menubar.stories.tsx +0 -472
- package/src/components/form/Menubar/Menubar.test.stories.tsx +0 -584
- package/src/components/form/PasswordStrength/PasswordStrength.stories.tsx +0 -562
- package/src/components/form/PasswordStrength/PasswordStrength.test.stories.tsx +0 -327
- package/src/components/form/PhoneInput/PhoneInput.stories.tsx +0 -495
- package/src/components/form/PhoneInput/PhoneInput.test.stories.tsx +0 -666
- package/src/components/form/RadioGroup/RadioGroup.stories.tsx +0 -518
- package/src/components/form/RadioGroup/RadioGroup.test.stories.tsx +0 -685
- package/src/components/form/RichTextEditor/RichTextEditor.stories.tsx +0 -261
- package/src/components/form/RichTextEditor/RichTextEditor.test.stories.tsx +0 -491
- package/src/components/form/SearchPalette/SearchPalette.stories.tsx +0 -135
- package/src/components/form/Select/Select.stories.tsx +0 -364
- package/src/components/form/Select/Select.test.stories.tsx +0 -985
- package/src/components/form/Slider/Slider.stories.tsx +0 -418
- package/src/components/form/Slider/Slider.test.stories.tsx +0 -1042
- package/src/components/form/Switch/Switch.stories.tsx +0 -697
- package/src/components/form/Switch/Switch.test.stories.tsx +0 -597
- package/src/components/form/Textarea/Textarea.stories.tsx +0 -473
- package/src/components/form/Textarea/Textarea.test.stories.tsx +0 -702
- package/src/components/form/Toggle/Toggle.stories.tsx +0 -638
- package/src/components/form/Toggle/Toggle.test.stories.tsx +0 -1159
- package/src/components/form/ToggleGroup/ToggleGroup.stories.tsx +0 -617
- package/src/components/form/ToggleGroup/ToggleGroup.test.stories.tsx +0 -915
- package/src/components/form/UploadButton/UploadButton.stories.tsx +0 -367
- package/src/components/form/UploadButton/UploadButton.test.stories.tsx +0 -573
- package/src/components/form/total-form/total-form.test.tsx +0 -214
- package/src/components/layout/Accordion/Accordion.stories.tsx +0 -694
- package/src/components/layout/Accordion/Accordion.test.stories.tsx +0 -1344
- package/src/components/layout/Card/Card.stories.tsx +0 -591
- package/src/components/layout/Card/Card.test.stories.tsx +0 -1134
- package/src/components/layout/CardGrid/__tests__/CardGrid.test.tsx +0 -92
- package/src/components/layout/Collapsible/Collapsible.stories.tsx +0 -180
- package/src/components/layout/Collapsible/Collapsible.test.stories.tsx +0 -308
- package/src/components/layout/Container/Container.stories.tsx +0 -557
- package/src/components/layout/Container/Container.test.stories.tsx +0 -745
- package/src/components/layout/ContentToolbar/ContentToolbar.stories.tsx +0 -129
- package/src/components/layout/ContentToolbar/ContentToolbar.test.stories.tsx +0 -251
- package/src/components/layout/ContentToolbar/__tests__/ColumnsMenu.test.tsx +0 -39
- package/src/components/layout/ContentToolbar/__tests__/MultiSelectDropdown.test.tsx +0 -131
- package/src/components/layout/ContentToolbar/__tests__/SavedViewsMenu.test.tsx +0 -99
- package/src/components/layout/Dashboard/Dashboard.stories.tsx +0 -104
- package/src/components/layout/Dashboard/Dashboard.test.stories.tsx +0 -190
- package/src/components/layout/Drawer/Drawer.stories.tsx +0 -658
- package/src/components/layout/Drawer/Drawer.test.stories.tsx +0 -1343
- package/src/components/layout/Resizable/Resizable.stories.tsx +0 -1039
- package/src/components/layout/Resizable/Resizable.test.stories.tsx +0 -754
- package/src/components/layout/ScrollArea/ScrollArea.stories.tsx +0 -651
- package/src/components/layout/ScrollArea/ScrollArea.test.stories.tsx +0 -619
- package/src/components/layout/Separator/Separator.stories.tsx +0 -563
- package/src/components/layout/Separator/Separator.test.stories.tsx +0 -518
- package/src/components/layout/SettingsLayout/SettingsLayout.stories.tsx +0 -192
- package/src/components/layout/SettingsLayout/SettingsLayout.test.stories.tsx +0 -175
- package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -609
- package/src/components/layout/Sidebar/Sidebar.test.stories.tsx +0 -1324
- package/src/components/layout/Skeleton/Skeleton.stories.tsx +0 -689
- package/src/components/layout/Skeleton/Skeleton.test.stories.tsx +0 -521
- package/src/components/layout/Spacer/Spacer.stories.tsx +0 -502
- package/src/components/layout/Spacer/Spacer.test.stories.tsx +0 -474
- package/src/components/layout/TableFilter/TableFilter.stories.tsx +0 -82
- package/src/components/layout/TableFilter/TableFilter.test.stories.tsx +0 -87
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.stories.tsx +0 -638
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.test.stories.tsx +0 -1008
- package/src/components/navigation/CommandPalette/CommandPalette.stories.tsx +0 -386
- package/src/components/navigation/CommandPalette/CommandPalette.test.stories.tsx +0 -435
- package/src/components/navigation/ContextMenu/ContextMenu.stories.tsx +0 -614
- package/src/components/navigation/ContextMenu/ContextMenu.test.stories.tsx +0 -845
- package/src/components/navigation/DropdownMenu/DropdownMenu.stories.tsx +0 -578
- package/src/components/navigation/DropdownMenu/DropdownMenu.test.stories.tsx +0 -660
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.stories.tsx +0 -516
- package/src/components/navigation/NavigationMenu/stories/NavigationMenu.test.stories.tsx +0 -935
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx +0 -501
- package/src/components/navigation/NavigationMenu/stories/NavigationMenuVertical.stories.tsx +0 -453
- package/src/components/navigation/Pagination/Pagination.stories.tsx +0 -602
- package/src/components/navigation/Pagination/Pagination.test.stories.tsx +0 -520
- package/src/components/navigation/Tabs/Tabs.stories.tsx +0 -1004
- package/src/components/navigation/Tabs/Tabs.test.stories.tsx +0 -1225
- package/src/components/typography/Blockquote/Blockquote.stories.tsx +0 -359
- package/src/components/typography/Blockquote/Blockquote.test.stories.tsx +0 -432
- package/src/components/typography/Code/Code.stories.tsx +0 -686
- package/src/components/typography/Code/Code.test.stories.tsx +0 -703
- package/src/components/typography/Heading/Heading.stories.tsx +0 -451
- package/src/components/typography/Heading/Heading.test.stories.tsx +0 -830
- package/src/components/typography/Paragraph/Paragraph.stories.tsx +0 -280
- package/src/components/typography/Paragraph/Paragraph.test.stories.tsx +0 -231
- package/src/components/typography/Text/Text.stories.tsx +0 -359
- package/src/components/typography/Text/Text.test.stories.tsx +0 -759
- package/src/components/utility/AnimatedIcon/AnimatedIcon.stories.tsx +0 -945
- package/src/components/utility/AnimatedIcon/AnimatedIcon.test.stories.tsx +0 -603
- package/src/components/utility/AspectRatio/AspectRatio.stories.tsx +0 -414
- package/src/components/utility/AspectRatio/AspectRatio.test.stories.tsx +0 -859
- package/src/components/utility/InfiniteScroll/InfiniteScroll.stories.tsx +0 -620
- package/src/components/utility/InfiniteScroll/InfiniteScroll.test.stories.tsx +0 -361
- package/src/components/utility/InstallPrompt/InstallPrompt.stories.tsx +0 -118
- package/src/components/utility/InstallPrompt/InstallPrompt.test.stories.tsx +0 -83
- package/src/components/utility/InstallPrompt/__tests__/InstallPrompt.ios.test.tsx +0 -65
- package/src/components/utility/InstallPrompt/__tests__/usePwaInstall.test.tsx +0 -271
- package/src/components/utility/Portal/Portal.stories.tsx +0 -340
- package/src/components/utility/Portal/Portal.test.stories.tsx +0 -2086
- package/src/components/utility/Transition/Transition.stories.tsx +0 -493
- package/src/components/utility/Transition/Transition.test.stories.tsx +0 -854
- package/src/components/utility/VirtualList/VirtualList.stories.tsx +0 -1073
- package/src/components/utility/VirtualList/VirtualList.test.stories.tsx +0 -1085
- package/src/components/utility/WorkflowStep/WorkflowStep.stories.tsx +0 -431
- package/src/components/utility/WorkflowStep/WorkflowStep.test.stories.tsx +0 -364
- /package/src/{button.tsx → button/button.tsx} +0 -0
|
@@ -1,609 +0,0 @@
|
|
|
1
|
-
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
2
|
-
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
3
|
-
import DashboardIcon from '@mui/icons-material/Dashboard';
|
|
4
|
-
import HomeIcon from '@mui/icons-material/Home';
|
|
5
|
-
import InboxIcon from '@mui/icons-material/Inbox';
|
|
6
|
-
import MenuIcon from '@mui/icons-material/Menu';
|
|
7
|
-
import PersonIcon from '@mui/icons-material/Person';
|
|
8
|
-
import SendIcon from '@mui/icons-material/Send';
|
|
9
|
-
import SettingsIcon from '@mui/icons-material/Settings';
|
|
10
|
-
import StarIcon from '@mui/icons-material/Star';
|
|
11
|
-
import {
|
|
12
|
-
Avatar,
|
|
13
|
-
Box,
|
|
14
|
-
IconButton,
|
|
15
|
-
List,
|
|
16
|
-
ListItem,
|
|
17
|
-
ListItemIcon,
|
|
18
|
-
ListItemText,
|
|
19
|
-
Typography,
|
|
20
|
-
} from '@mui/material';
|
|
21
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
22
|
-
import React, { useState } from 'react';
|
|
23
|
-
|
|
24
|
-
import { Sidebar, SidebarContent, SidebarFooter,SidebarHeader } from './Sidebar';
|
|
25
|
-
|
|
26
|
-
const meta: Meta<typeof Sidebar> = {
|
|
27
|
-
title: 'Layout/Sidebar',
|
|
28
|
-
component: Sidebar,
|
|
29
|
-
parameters: {
|
|
30
|
-
layout: 'fullscreen',
|
|
31
|
-
docs: {
|
|
32
|
-
description: {
|
|
33
|
-
component:
|
|
34
|
-
'A navigation sidebar component with multiple variants including fixed, collapsible, floating, and glass styles.',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
tags: ['autodocs', 'component:Sidebar'],
|
|
39
|
-
argTypes: {
|
|
40
|
-
variant: {
|
|
41
|
-
control: { type: 'select' },
|
|
42
|
-
options: ['fixed', 'collapsible', 'floating', 'glass'],
|
|
43
|
-
},
|
|
44
|
-
open: {
|
|
45
|
-
control: { type: 'boolean' },
|
|
46
|
-
},
|
|
47
|
-
width: {
|
|
48
|
-
control: { type: 'number' },
|
|
49
|
-
},
|
|
50
|
-
collapsedWidth: {
|
|
51
|
-
control: { type: 'number' },
|
|
52
|
-
},
|
|
53
|
-
position: {
|
|
54
|
-
control: { type: 'select' },
|
|
55
|
-
options: ['left', 'right'],
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default meta;
|
|
61
|
-
type Story = StoryObj<typeof meta>;
|
|
62
|
-
|
|
63
|
-
const navigationItems = [
|
|
64
|
-
{ icon: <HomeIcon />, label: 'Home' },
|
|
65
|
-
{ icon: <DashboardIcon />, label: 'Dashboard' },
|
|
66
|
-
{ icon: <InboxIcon />, label: 'Inbox' },
|
|
67
|
-
{ icon: <StarIcon />, label: 'Favorites' },
|
|
68
|
-
{ icon: <SendIcon />, label: 'Sent' },
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
const SidebarDemo = ({
|
|
72
|
-
variant = 'fixed',
|
|
73
|
-
showToggle = false,
|
|
74
|
-
}: {
|
|
75
|
-
variant?: 'fixed' | 'collapsible' | 'floating' | 'glass';
|
|
76
|
-
showToggle?: boolean;
|
|
77
|
-
}) => {
|
|
78
|
-
const [open, setOpen] = useState(true);
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<Box sx={{ display: 'flex', height: '500px', bgcolor: 'grey.50', position: 'relative' }}>
|
|
82
|
-
<Sidebar variant={variant} open={open} onToggle={() => setOpen(!open)}>
|
|
83
|
-
<SidebarHeader>
|
|
84
|
-
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
85
|
-
<Typography variant="h6" sx={{ display: open ? 'block' : 'none' }}>
|
|
86
|
-
My App
|
|
87
|
-
</Typography>
|
|
88
|
-
{showToggle && (
|
|
89
|
-
<IconButton onClick={() => setOpen(!open)} size="small">
|
|
90
|
-
{open ? <ChevronLeftIcon /> : <ChevronRightIcon />}
|
|
91
|
-
</IconButton>
|
|
92
|
-
)}
|
|
93
|
-
</Box>
|
|
94
|
-
</SidebarHeader>
|
|
95
|
-
|
|
96
|
-
<SidebarContent>
|
|
97
|
-
<List>
|
|
98
|
-
{navigationItems.map((item, index) => (
|
|
99
|
-
<ListItem button key={index}>
|
|
100
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
101
|
-
<ListItemText primary={item.label} sx={{ display: open ? 'block' : 'none' }} />
|
|
102
|
-
</ListItem>
|
|
103
|
-
))}
|
|
104
|
-
</List>
|
|
105
|
-
</SidebarContent>
|
|
106
|
-
|
|
107
|
-
<SidebarFooter>
|
|
108
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
109
|
-
<Avatar sx={{ width: 32, height: 32 }}>U</Avatar>
|
|
110
|
-
<Box sx={{ display: open ? 'block' : 'none' }}>
|
|
111
|
-
<Typography variant="body2">User Name</Typography>
|
|
112
|
-
<Typography variant="caption" color="text.secondary">
|
|
113
|
-
user@example.com
|
|
114
|
-
</Typography>
|
|
115
|
-
</Box>
|
|
116
|
-
</Box>
|
|
117
|
-
</SidebarFooter>
|
|
118
|
-
</Sidebar>
|
|
119
|
-
|
|
120
|
-
<Box sx={{ flex: 1, p: 3 }}>
|
|
121
|
-
<Typography variant="h5" gutterBottom>
|
|
122
|
-
Main Content Area
|
|
123
|
-
</Typography>
|
|
124
|
-
<Typography variant="body1" color="text.secondary">
|
|
125
|
-
This is the main content area next to the sidebar. The sidebar can have different variants
|
|
126
|
-
and behaviors.
|
|
127
|
-
</Typography>
|
|
128
|
-
</Box>
|
|
129
|
-
</Box>
|
|
130
|
-
);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export const Fixed: Story = {
|
|
134
|
-
render: () => <SidebarDemo variant="fixed" />,
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
export const Collapsible: Story = {
|
|
138
|
-
render: () => <SidebarDemo variant="collapsible" showToggle />,
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const Floating: Story = {
|
|
142
|
-
render: () => (
|
|
143
|
-
<Box sx={{ height: '500px', bgcolor: 'grey.100', position: 'relative' }}>
|
|
144
|
-
<SidebarDemo variant="floating" />
|
|
145
|
-
</Box>
|
|
146
|
-
),
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const Glass: Story = {
|
|
150
|
-
render: () => (
|
|
151
|
-
<Box
|
|
152
|
-
sx={{
|
|
153
|
-
height: '500px',
|
|
154
|
-
position: 'relative',
|
|
155
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
156
|
-
}}
|
|
157
|
-
>
|
|
158
|
-
<Box sx={{ display: 'flex', height: '100%' }}>
|
|
159
|
-
<Sidebar variant="glass" open={true}>
|
|
160
|
-
<SidebarHeader>
|
|
161
|
-
<Typography variant="h6" sx={{ color: 'white' }}>
|
|
162
|
-
Glass Sidebar
|
|
163
|
-
</Typography>
|
|
164
|
-
</SidebarHeader>
|
|
165
|
-
|
|
166
|
-
<SidebarContent>
|
|
167
|
-
<List>
|
|
168
|
-
{navigationItems.map((item, index) => (
|
|
169
|
-
<ListItem button key={index} sx={{ color: 'white' }}>
|
|
170
|
-
<ListItemIcon sx={{ color: 'white' }}>{item.icon}</ListItemIcon>
|
|
171
|
-
<ListItemText primary={item.label} />
|
|
172
|
-
</ListItem>
|
|
173
|
-
))}
|
|
174
|
-
</List>
|
|
175
|
-
</SidebarContent>
|
|
176
|
-
|
|
177
|
-
<SidebarFooter>
|
|
178
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
|
179
|
-
<Avatar sx={{ width: 32, height: 32 }}>G</Avatar>
|
|
180
|
-
<Box>
|
|
181
|
-
<Typography variant="body2" sx={{ color: 'white' }}>
|
|
182
|
-
Glass User
|
|
183
|
-
</Typography>
|
|
184
|
-
</Box>
|
|
185
|
-
</Box>
|
|
186
|
-
</SidebarFooter>
|
|
187
|
-
</Sidebar>
|
|
188
|
-
|
|
189
|
-
<Box sx={{ flex: 1, p: 3, color: 'white' }}>
|
|
190
|
-
<Typography variant="h4" gutterBottom>
|
|
191
|
-
Glass Morphism Effect
|
|
192
|
-
</Typography>
|
|
193
|
-
<Typography variant="body1">
|
|
194
|
-
The glass variant creates a beautiful translucent effect with backdrop blur.
|
|
195
|
-
</Typography>
|
|
196
|
-
</Box>
|
|
197
|
-
</Box>
|
|
198
|
-
</Box>
|
|
199
|
-
),
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
export const RightPositioned: Story = {
|
|
203
|
-
render: () => (
|
|
204
|
-
<Box
|
|
205
|
-
sx={{
|
|
206
|
-
display: 'flex',
|
|
207
|
-
height: '500px',
|
|
208
|
-
bgcolor: 'grey.50',
|
|
209
|
-
position: 'relative',
|
|
210
|
-
flexDirection: 'row-reverse',
|
|
211
|
-
}}
|
|
212
|
-
>
|
|
213
|
-
<Sidebar variant="fixed" open={true} position="right">
|
|
214
|
-
<SidebarHeader>
|
|
215
|
-
<Typography variant="h6" align="center">
|
|
216
|
-
Right Sidebar
|
|
217
|
-
</Typography>
|
|
218
|
-
</SidebarHeader>
|
|
219
|
-
|
|
220
|
-
<SidebarContent>
|
|
221
|
-
<List>
|
|
222
|
-
<ListItem>
|
|
223
|
-
<ListItemIcon>
|
|
224
|
-
<SettingsIcon />
|
|
225
|
-
</ListItemIcon>
|
|
226
|
-
<ListItemText primary="Settings" />
|
|
227
|
-
</ListItem>
|
|
228
|
-
<ListItem>
|
|
229
|
-
<ListItemIcon>
|
|
230
|
-
<PersonIcon />
|
|
231
|
-
</ListItemIcon>
|
|
232
|
-
<ListItemText primary="Profile" />
|
|
233
|
-
</ListItem>
|
|
234
|
-
</List>
|
|
235
|
-
</SidebarContent>
|
|
236
|
-
</Sidebar>
|
|
237
|
-
|
|
238
|
-
<Box sx={{ flex: 1, p: 3 }}>
|
|
239
|
-
<Typography variant="h5" gutterBottom>
|
|
240
|
-
Right-Positioned Sidebar
|
|
241
|
-
</Typography>
|
|
242
|
-
<Typography variant="body1" color="text.secondary">
|
|
243
|
-
The sidebar can also be positioned on the right side of the layout.
|
|
244
|
-
</Typography>
|
|
245
|
-
</Box>
|
|
246
|
-
</Box>
|
|
247
|
-
),
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
const MiniDrawerComponent = () => {
|
|
251
|
-
const [open, setOpen] = useState(false);
|
|
252
|
-
|
|
253
|
-
return (
|
|
254
|
-
<Box sx={{ display: 'flex', height: '500px', bgcolor: 'grey.50' }}>
|
|
255
|
-
<Sidebar variant="collapsible" open={open} width={240} collapsedWidth={56}>
|
|
256
|
-
<Box sx={{ p: 1, display: 'flex', justifyContent: open ? 'flex-end' : 'center' }}>
|
|
257
|
-
<IconButton onClick={() => setOpen(!open)}>
|
|
258
|
-
<MenuIcon />
|
|
259
|
-
</IconButton>
|
|
260
|
-
</Box>
|
|
261
|
-
|
|
262
|
-
<List>
|
|
263
|
-
{navigationItems.map((item, index) => (
|
|
264
|
-
<ListItem button key={index}>
|
|
265
|
-
<ListItemIcon sx={{ minWidth: open ? 56 : 40, justifyContent: 'center' }}>
|
|
266
|
-
{item.icon}
|
|
267
|
-
</ListItemIcon>
|
|
268
|
-
{open && <ListItemText primary={item.label} />}
|
|
269
|
-
</ListItem>
|
|
270
|
-
))}
|
|
271
|
-
</List>
|
|
272
|
-
</Sidebar>
|
|
273
|
-
|
|
274
|
-
<Box sx={{ flex: 1, p: 3 }}>
|
|
275
|
-
<Typography variant="h5" gutterBottom>
|
|
276
|
-
Mini Drawer Variant
|
|
277
|
-
</Typography>
|
|
278
|
-
<Typography variant="body1" color="text.secondary">
|
|
279
|
-
Click the menu icon to expand/collapse the sidebar. When collapsed, only icons are
|
|
280
|
-
visible.
|
|
281
|
-
</Typography>
|
|
282
|
-
</Box>
|
|
283
|
-
</Box>
|
|
284
|
-
);
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
export const MiniDrawer: Story = {
|
|
288
|
-
render: () => <MiniDrawerComponent />,
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
// Required exports for validation
|
|
292
|
-
export const Default: Story = {
|
|
293
|
-
render: () => <SidebarDemo variant="fixed" />,
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export const AllVariants: Story = {
|
|
297
|
-
render: () => (
|
|
298
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, height: '1200px' }}>
|
|
299
|
-
<Typography variant="h6" gutterBottom>
|
|
300
|
-
Fixed Variant
|
|
301
|
-
</Typography>
|
|
302
|
-
<Box sx={{ height: '240px' }}>
|
|
303
|
-
<SidebarDemo variant="fixed" />
|
|
304
|
-
</Box>
|
|
305
|
-
|
|
306
|
-
<Typography variant="h6" gutterBottom>
|
|
307
|
-
Collapsible Variant
|
|
308
|
-
</Typography>
|
|
309
|
-
<Box sx={{ height: '240px' }}>
|
|
310
|
-
<SidebarDemo variant="collapsible" showToggle />
|
|
311
|
-
</Box>
|
|
312
|
-
|
|
313
|
-
<Typography variant="h6" gutterBottom>
|
|
314
|
-
Floating Variant
|
|
315
|
-
</Typography>
|
|
316
|
-
<Box sx={{ height: '240px', bgcolor: 'grey.100' }}>
|
|
317
|
-
<SidebarDemo variant="floating" />
|
|
318
|
-
</Box>
|
|
319
|
-
|
|
320
|
-
<Typography variant="h6" gutterBottom>
|
|
321
|
-
Glass Variant
|
|
322
|
-
</Typography>
|
|
323
|
-
<Box
|
|
324
|
-
sx={{
|
|
325
|
-
height: '240px',
|
|
326
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
327
|
-
position: 'relative',
|
|
328
|
-
}}
|
|
329
|
-
>
|
|
330
|
-
<Box sx={{ display: 'flex', height: '100%' }}>
|
|
331
|
-
<Sidebar variant="glass" open={true}>
|
|
332
|
-
<SidebarHeader>
|
|
333
|
-
<Typography variant="h6" sx={{ color: 'white' }}>
|
|
334
|
-
Glass App
|
|
335
|
-
</Typography>
|
|
336
|
-
</SidebarHeader>
|
|
337
|
-
<SidebarContent>
|
|
338
|
-
<List>
|
|
339
|
-
{navigationItems.slice(0, 3).map((item, index) => (
|
|
340
|
-
<ListItem button key={index} sx={{ color: 'white' }}>
|
|
341
|
-
<ListItemIcon sx={{ color: 'white' }}>{item.icon}</ListItemIcon>
|
|
342
|
-
<ListItemText primary={item.label} />
|
|
343
|
-
</ListItem>
|
|
344
|
-
))}
|
|
345
|
-
</List>
|
|
346
|
-
</SidebarContent>
|
|
347
|
-
</Sidebar>
|
|
348
|
-
<Box sx={{ flex: 1, p: 2, color: 'white' }}>
|
|
349
|
-
<Typography variant="h6">Glass Effect Demo</Typography>
|
|
350
|
-
</Box>
|
|
351
|
-
</Box>
|
|
352
|
-
</Box>
|
|
353
|
-
</Box>
|
|
354
|
-
),
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
export const AllSizes: Story = {
|
|
358
|
-
render: () => (
|
|
359
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, height: '800px' }}>
|
|
360
|
-
<Typography variant="h6" gutterBottom>
|
|
361
|
-
Default Width (280px)
|
|
362
|
-
</Typography>
|
|
363
|
-
<Box sx={{ height: '180px' }}>
|
|
364
|
-
<SidebarDemo variant="fixed" />
|
|
365
|
-
</Box>
|
|
366
|
-
|
|
367
|
-
<Typography variant="h6" gutterBottom>
|
|
368
|
-
Wide Sidebar (360px)
|
|
369
|
-
</Typography>
|
|
370
|
-
<Box sx={{ height: '180px' }}>
|
|
371
|
-
<Box sx={{ display: 'flex', height: '100%', bgcolor: 'grey.50' }}>
|
|
372
|
-
<Sidebar variant="fixed" open={true} width={360}>
|
|
373
|
-
<SidebarHeader>
|
|
374
|
-
<Typography variant="h6">Wide Sidebar</Typography>
|
|
375
|
-
</SidebarHeader>
|
|
376
|
-
<SidebarContent>
|
|
377
|
-
<List>
|
|
378
|
-
{navigationItems.map((item, index) => (
|
|
379
|
-
<ListItem button key={index}>
|
|
380
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
381
|
-
<ListItemText primary={item.label} />
|
|
382
|
-
</ListItem>
|
|
383
|
-
))}
|
|
384
|
-
</List>
|
|
385
|
-
</SidebarContent>
|
|
386
|
-
</Sidebar>
|
|
387
|
-
<Box sx={{ flex: 1, p: 2 }}>
|
|
388
|
-
<Typography variant="body1">Wide sidebar content area</Typography>
|
|
389
|
-
</Box>
|
|
390
|
-
</Box>
|
|
391
|
-
</Box>
|
|
392
|
-
|
|
393
|
-
<Typography variant="h6" gutterBottom>
|
|
394
|
-
Narrow Sidebar (200px)
|
|
395
|
-
</Typography>
|
|
396
|
-
<Box sx={{ height: '180px' }}>
|
|
397
|
-
<Box sx={{ display: 'flex', height: '100%', bgcolor: 'grey.50' }}>
|
|
398
|
-
<Sidebar variant="fixed" open={true} width={200}>
|
|
399
|
-
<SidebarHeader>
|
|
400
|
-
<Typography variant="h6">Narrow</Typography>
|
|
401
|
-
</SidebarHeader>
|
|
402
|
-
<SidebarContent>
|
|
403
|
-
<List>
|
|
404
|
-
{navigationItems.slice(0, 3).map((item, index) => (
|
|
405
|
-
<ListItem button key={index}>
|
|
406
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
407
|
-
<ListItemText primary={item.label} />
|
|
408
|
-
</ListItem>
|
|
409
|
-
))}
|
|
410
|
-
</List>
|
|
411
|
-
</SidebarContent>
|
|
412
|
-
</Sidebar>
|
|
413
|
-
<Box sx={{ flex: 1, p: 2 }}>
|
|
414
|
-
<Typography variant="body1">Narrow sidebar content area</Typography>
|
|
415
|
-
</Box>
|
|
416
|
-
</Box>
|
|
417
|
-
</Box>
|
|
418
|
-
</Box>
|
|
419
|
-
),
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
export const AllStates: Story = {
|
|
423
|
-
render: () => {
|
|
424
|
-
const [openState1, setOpenState1] = useState(true);
|
|
425
|
-
const [openState2, setOpenState2] = useState(false);
|
|
426
|
-
|
|
427
|
-
return (
|
|
428
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, height: '600px' }}>
|
|
429
|
-
<Typography variant="h6" gutterBottom>
|
|
430
|
-
Open State
|
|
431
|
-
</Typography>
|
|
432
|
-
<Box sx={{ height: '180px' }}>
|
|
433
|
-
<Box sx={{ display: 'flex', height: '100%', bgcolor: 'grey.50' }}>
|
|
434
|
-
<Sidebar
|
|
435
|
-
variant="collapsible"
|
|
436
|
-
open={openState1}
|
|
437
|
-
onToggle={() => setOpenState1(!openState1)}
|
|
438
|
-
>
|
|
439
|
-
<SidebarHeader>
|
|
440
|
-
<Box
|
|
441
|
-
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}
|
|
442
|
-
>
|
|
443
|
-
<Typography variant="h6">Open Sidebar</Typography>
|
|
444
|
-
<IconButton onClick={() => setOpenState1(!openState1)} size="small">
|
|
445
|
-
<ChevronLeftIcon />
|
|
446
|
-
</IconButton>
|
|
447
|
-
</Box>
|
|
448
|
-
</SidebarHeader>
|
|
449
|
-
<SidebarContent>
|
|
450
|
-
<List>
|
|
451
|
-
{navigationItems.slice(0, 3).map((item, index) => (
|
|
452
|
-
<ListItem button key={index}>
|
|
453
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
454
|
-
<ListItemText primary={item.label} />
|
|
455
|
-
</ListItem>
|
|
456
|
-
))}
|
|
457
|
-
</List>
|
|
458
|
-
</SidebarContent>
|
|
459
|
-
</Sidebar>
|
|
460
|
-
<Box sx={{ flex: 1, p: 2 }}>
|
|
461
|
-
<Typography variant="body1">Sidebar is expanded</Typography>
|
|
462
|
-
</Box>
|
|
463
|
-
</Box>
|
|
464
|
-
</Box>
|
|
465
|
-
|
|
466
|
-
<Typography variant="h6" gutterBottom>
|
|
467
|
-
Collapsed State
|
|
468
|
-
</Typography>
|
|
469
|
-
<Box sx={{ height: '180px' }}>
|
|
470
|
-
<Box sx={{ display: 'flex', height: '100%', bgcolor: 'grey.50' }}>
|
|
471
|
-
<Sidebar
|
|
472
|
-
variant="collapsible"
|
|
473
|
-
open={openState2}
|
|
474
|
-
onToggle={() => setOpenState2(!openState2)}
|
|
475
|
-
collapsedWidth={60}
|
|
476
|
-
>
|
|
477
|
-
<SidebarHeader>
|
|
478
|
-
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
479
|
-
<IconButton onClick={() => setOpenState2(!openState2)} size="small">
|
|
480
|
-
<ChevronRightIcon />
|
|
481
|
-
</IconButton>
|
|
482
|
-
</Box>
|
|
483
|
-
</SidebarHeader>
|
|
484
|
-
<SidebarContent>
|
|
485
|
-
<List>
|
|
486
|
-
{navigationItems.slice(0, 3).map((item, index) => (
|
|
487
|
-
<ListItem button key={index}>
|
|
488
|
-
<ListItemIcon sx={{ minWidth: 'auto', justifyContent: 'center' }}>
|
|
489
|
-
{item.icon}
|
|
490
|
-
</ListItemIcon>
|
|
491
|
-
</ListItem>
|
|
492
|
-
))}
|
|
493
|
-
</List>
|
|
494
|
-
</SidebarContent>
|
|
495
|
-
</Sidebar>
|
|
496
|
-
<Box sx={{ flex: 1, p: 2 }}>
|
|
497
|
-
<Typography variant="body1">Sidebar is collapsed</Typography>
|
|
498
|
-
</Box>
|
|
499
|
-
</Box>
|
|
500
|
-
</Box>
|
|
501
|
-
</Box>
|
|
502
|
-
);
|
|
503
|
-
},
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export const InteractiveStates: Story = {
|
|
507
|
-
render: () => {
|
|
508
|
-
const [activeItem, setActiveItem] = useState(0);
|
|
509
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
510
|
-
|
|
511
|
-
return (
|
|
512
|
-
<Box sx={{ display: 'flex', height: '400px', bgcolor: 'grey.50' }}>
|
|
513
|
-
<Sidebar variant="fixed" open={true}>
|
|
514
|
-
<SidebarHeader>
|
|
515
|
-
<Typography variant="h6">Interactive Sidebar</Typography>
|
|
516
|
-
</SidebarHeader>
|
|
517
|
-
<SidebarContent>
|
|
518
|
-
<List>
|
|
519
|
-
{navigationItems.map((item, index) => (
|
|
520
|
-
<ListItem
|
|
521
|
-
button
|
|
522
|
-
key={index}
|
|
523
|
-
selected={activeItem === index}
|
|
524
|
-
onClick={() => setActiveItem(index)}
|
|
525
|
-
onMouseEnter={() => setIsHovered(true)}
|
|
526
|
-
onMouseLeave={() => setIsHovered(false)}
|
|
527
|
-
sx={{
|
|
528
|
-
'&.Mui-selected': {
|
|
529
|
-
bgcolor: 'primary.light',
|
|
530
|
-
color: 'primary.contrastText',
|
|
531
|
-
'& .MuiListItemIcon-root': {
|
|
532
|
-
color: 'primary.contrastText',
|
|
533
|
-
},
|
|
534
|
-
},
|
|
535
|
-
'&:hover': {
|
|
536
|
-
bgcolor: 'action.hover',
|
|
537
|
-
},
|
|
538
|
-
}}
|
|
539
|
-
>
|
|
540
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
541
|
-
<ListItemText primary={item.label} />
|
|
542
|
-
</ListItem>
|
|
543
|
-
))}
|
|
544
|
-
</List>
|
|
545
|
-
</SidebarContent>
|
|
546
|
-
<SidebarFooter>
|
|
547
|
-
<Box sx={{ p: 2, bgcolor: isHovered ? 'action.hover' : 'transparent' }}>
|
|
548
|
-
<Typography variant="body2" color="text.secondary">
|
|
549
|
-
Active: {navigationItems[activeItem]?.label}
|
|
550
|
-
</Typography>
|
|
551
|
-
</Box>
|
|
552
|
-
</SidebarFooter>
|
|
553
|
-
</Sidebar>
|
|
554
|
-
<Box sx={{ flex: 1, p: 3 }}>
|
|
555
|
-
<Typography variant="h5" gutterBottom>
|
|
556
|
-
Interactive States Demo
|
|
557
|
-
</Typography>
|
|
558
|
-
<Typography variant="body1" color="text.secondary">
|
|
559
|
-
Click on sidebar items to see selection state. Hover over items to see hover effects.
|
|
560
|
-
Currently selected: {navigationItems[activeItem]?.label}
|
|
561
|
-
</Typography>
|
|
562
|
-
</Box>
|
|
563
|
-
</Box>
|
|
564
|
-
);
|
|
565
|
-
},
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
export const Responsive: Story = {
|
|
569
|
-
render: () => (
|
|
570
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, height: '800px' }}>
|
|
571
|
-
<Typography variant="h6" gutterBottom>
|
|
572
|
-
Desktop View (>= 768px)
|
|
573
|
-
</Typography>
|
|
574
|
-
<Box sx={{ height: '200px', width: '100%', minWidth: '768px' }}>
|
|
575
|
-
<SidebarDemo variant="fixed" />
|
|
576
|
-
</Box>
|
|
577
|
-
|
|
578
|
-
<Typography variant="h6" gutterBottom>
|
|
579
|
-
Tablet View (768px)
|
|
580
|
-
</Typography>
|
|
581
|
-
<Box sx={{ height: '200px', width: '768px', mx: 'auto' }}>
|
|
582
|
-
<SidebarDemo variant="collapsible" showToggle />
|
|
583
|
-
</Box>
|
|
584
|
-
|
|
585
|
-
<Typography variant="h6" gutterBottom>
|
|
586
|
-
Mobile View (< 600px)
|
|
587
|
-
</Typography>
|
|
588
|
-
<Box sx={{ height: '200px', width: '375px', mx: 'auto' }}>
|
|
589
|
-
<Box sx={{ display: 'flex', height: '100%', bgcolor: 'grey.50', position: 'relative' }}>
|
|
590
|
-
<Sidebar variant="floating" open={true} width={280}>
|
|
591
|
-
<SidebarHeader>
|
|
592
|
-
<Typography variant="h6">Mobile Menu</Typography>
|
|
593
|
-
</SidebarHeader>
|
|
594
|
-
<SidebarContent>
|
|
595
|
-
<List>
|
|
596
|
-
{navigationItems.slice(0, 3).map((item, index) => (
|
|
597
|
-
<ListItem button key={index}>
|
|
598
|
-
<ListItemIcon>{item.icon}</ListItemIcon>
|
|
599
|
-
<ListItemText primary={item.label} />
|
|
600
|
-
</ListItem>
|
|
601
|
-
))}
|
|
602
|
-
</List>
|
|
603
|
-
</SidebarContent>
|
|
604
|
-
</Sidebar>
|
|
605
|
-
</Box>
|
|
606
|
-
</Box>
|
|
607
|
-
</Box>
|
|
608
|
-
),
|
|
609
|
-
};
|